/// <summary> /// Create the Ioc Container, <see cref="IIocContainer"/> that will be used by this IOC /// implementation to resolve the request using the underlying IOC methodology. /// </summary> /// <returns></returns> public IDependencyBuilder CreateDependencyBuilder() { var builder = new DependencyBuilder(Container); builder.BindInstance(Activator).Resolve <IDependencyTypeActivator>(); builder.BindInstance(InspectConstructor.Instance).Resolve <IInspectConstructor>(); builder.BindInstance(InspectMethod.Instance).Resolve <IInspectMethod>(); builder.BindInstance(Create.Instance).Resolve <ICreate>(); builder.BindInstance(InstanceResolution).Resolve <IDependencyInstanceResolution>(); return(builder); }
public IDependencyBuilder CreateDependencyBuilder() { var builder = new DependencyBuilder(_container); builder.BindInstance(_container).Resolve <IDependencyContainer>(); return(builder); }
public IDependencyBuilder CreateDependencyBuilder() { var activator = new MicrosoftUtilitiesActivator(InspectConstructor.Instance); var dependencyContainer = new MicrosoftDependencyContainer(_serviceCollection, _resolutionConfiguration, activator, new DependencyFactory(InspectMethod.Instance)); var builder = new DependencyBuilder(dependencyContainer); builder.BindInstance(InspectConstructor.Instance).Resolve <IInspectConstructor>(); builder.BindInstance(InspectMethod.Instance).Resolve <IInspectMethod>(); builder.BindInstance(Create.Instance).Resolve <ICreate>(); builder.BindInstance(_resolutionConfiguration).Resolve <IDependencyResolutionConfiguration>(); builder.BindInstance(_instanceResolution).Resolve <IDependencyInstanceResolution>(); builder.BindInstance(activator).Resolve <IDependencyTypeActivator>(); builder.Bind <DependencyResolver>().Resolve <IDependencyResolver>(); return(builder); }