DryIoc
DryIoc copied to clipboard
DryIoc is fast, small, full-featured IoC Container for .NET
Example (from https://github.com/Yeah69/DryIoc.Playground/blob/main/DryIoc.Playground/Case3.cs): ```cs namespace DryIoc.Playground; public static class Case3 { public static void Do() { var container = new Container(); container.RegisterInstance(0); container.Register(); container.Register(); container.Register(); var parent = container.Resolve(); Console.WriteLine(parent.Dependency.Value);...
Faster drop-in Ninject replacement keeping the API surface intact on top of the DryIoc implementation. Similar to the DryIoc.Syntax.Autofac.
```cs interface ICompileTimeContainer { bool IsRegistered(Type t); bool TryResolve(Type t, out object service); IEnumerable ResolveMany(Type t); } ``` It may work together with #495 It maybe set or replaced via...
Currently, MS.DI `GetRequiredService` is implemented as extension method as following: ```cs public static object GetRequiredService](this IServiceProvider provider, Type serviceType) { if (provider is ISupportRequiredService requiredServiceSupportingProvider) { return requiredServiceSupportingProvider.GetRequiredService(serviceType); } object?...
`IScope` is leaky because in many places internally DryIoc casts it to `Scope`. And it is slow because it introduces a massive amount of virtual calls in the object graph....
Currently it in preview and last was updated in 2021
Specifically, it **always** used for the `Lazy` wrapper. Often used for multiple service registrations and context-based registrations.