/// <summary> /// Initializes a new instance of the <see cref="AutofacServiceRegistrar"/> class. /// </summary> /// <param name="parent">The parent.</param> /// <param name="builder">The builder.</param> /// <param name="containerBuilder">The container builder.</param> public AutofacServiceRegistrar(AutofacServiceLocator parent, ContainerBuilder builder, out Func <IContainer> containerBuilder) : this(parent, null) { _builder = builder; containerBuilder = (() => _container = _builder.Build()); }
/// <summary> /// Initializes a new instance of the <see cref="AutofacServiceRegistrar"/> class. /// </summary> /// <param name="parent">The parent.</param> /// <param name="container">The container.</param> public AutofacServiceRegistrar(AutofacServiceLocator parent, IContainer container) { _parent = parent; _container = container; LifetimeForRegisters = ServiceRegistrarLifetime.Transient; }