예제 #1
0
 /// <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());
 }
예제 #2
0
 /// <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;
 }