src/Topelab.Core.Resolver.Autofac/ResolverFactory.cs
/// <summary>
/// Creates an IResolver based on the specified resolve info collection.
/// </summary>
/// <param name="resolveInfoCollection">The resolve info collection.</param>
Creates an IResolver based on the specified resolve info collection.
Creates an IResolver based on the specified resolve info collection .
public static IResolver Create(ResolveInfoCollection resolveInfoCollection)
        {
            Dictionary<string, ConstructorInfo> constructorsByKey = new();
            ContainerBuilder builder = new();
            if (resolveInfoCollection != null)
            {
                builder.RegisterAutofac(resolveInfoCollection, constructorsByKey);
            }
            resolver = new Resolver();
            builder.RegisterInstance((IResolver)resolver);
            var container = builder.Build();
            resolver.Initialize(container, constructorsByKey);
            return resolver;
        }
public static IResolver Create ( ResolveInfoCollection resolveInfoCollection ) { Dictionary < string , ConstructorInfo > constructorsByKey = new ( ) ; ContainerBuilder builder = new ( ) ; if ( resolveInfoCollection != null ) { builder . RegisterAutofac ( resolveInfoCollection , constructorsByKey ) ; } resolver = new Resolver ( ) ; builder . RegisterInstance ( ( IResolver ) resolver ) ; var container = builder . Build ( ) ; resolver . Initialize ( container , constructorsByKey ) ; return resolver ; }
Creates an IResolver based on the specified resolve info collection.
Creates an IResolver based on the specified resolve info collection .
resolveInfoCollection
ResolveInfoCollection
The resolve info collection.
The resolve info collection .