Beispiel #1
0
        public void RegistrarAssembly(IContextoConvencionalRegistracao contexto)
        {
            contexto.GerenciadorIoC.ContainerIoC.Register(
                Classes.FromAssembly(contexto.Assembly)
                .IncludeNonPublicTypes()
                .BasedOn <IDependenciaTransient>()
                .If(type => !type.GetTypeInfo().IsGenericTypeDefinition)
                .WithService.Self()
                .WithService.DefaultInterfaces()
                .LifestyleTransient()
                );

            contexto.GerenciadorIoC.ContainerIoC.Register(
                Classes.FromAssembly(contexto.Assembly)
                .IncludeNonPublicTypes()
                .BasedOn <IDependenciaSingleton>()
                .If(type => !type.GetTypeInfo().IsGenericTypeDefinition)
                .WithService.Self()
                .WithService.DefaultInterfaces()
                .LifestyleSingleton()
                );

            contexto.GerenciadorIoC.ContainerIoC.Register(
                Classes.FromAssembly(contexto.Assembly)
                .IncludeNonPublicTypes()
                .BasedOn <IInterceptor>()
                .If(type => !type.GetTypeInfo().IsGenericTypeDefinition)
                .WithService.Self()
                .WithService.DefaultInterfaces()
                .LifestyleTransient()
                );
        }
 public void RegistrarAssembly(IContextoConvencionalRegistracao contexto)
 {
     contexto.GerenciadorIoC.ContainerIoC.Register(
         Classes.FromAssembly(contexto.Assembly)
         .IncludeNonPublicTypes()
         .BasedOn <IPerfilMapeador>()
         .If(type => !type.GetTypeInfo().IsGenericTypeDefinition)
         .WithService.Base()
         .LifestyleSingleton()
         );
 }