Example #1
0
 /// <summary>
 /// Register all services
 /// </summary>
 /// <param name="registrar">Registrar used for the registration</param>
 public void Register(IContainerRegistrar registrar)
 {
     //just register everything that has been tagged with the [Component] attribute
     registrar.RegisterComponents(Lifetime.Scoped, Assembly.GetExecutingAssembly());
 }
 /// <summary>
 /// Register all services
 /// </summary>
 /// <param name="registrar">Registrar used for the registration</param>
 public void Register(IContainerRegistrar registrar)
 {
     registrar.RegisterComponents(Lifetime.Transient, typeof(SampleService).Assembly);
 }
 public override void RegisterUsingComponentAttribute(Assembly assembly)
 {
     _containerRegistrar.RegisterComponents(Lifetime.Scoped, assembly);
 }
Example #4
0
 /// <summary>
 /// Register all services
 /// </summary>
 /// <param name="registrar">Registrar used for the registration</param>
 public void Register(IContainerRegistrar registrar)
 {
     registrar.RegisterComponents(Lifetime.Scoped, Assembly.GetExecutingAssembly());
 }
Example #5
0
 /// <summary>
 /// Register all services
 /// </summary>
 /// <param name="registrar">Registrar used for the registration</param>
 public void Register(IContainerRegistrar registrar)
 {
     //just register everything that has been tagged with the [Component] attribute
     registrar.RegisterComponents(Lifetime.Scoped, Assembly.GetExecutingAssembly());
 }
Example #6
0
 /// <summary>
 /// Register all services
 /// </summary>
 /// <param name="registrar">Registrar used for the registration</param>
 public void Register(IContainerRegistrar registrar)
 {
     registrar.RegisterComponents(Lifetime.Transient, typeof(SampleService).Assembly);
 }