コード例 #1
0
        protected override void Load(ContainerBuilder builder)
        {
            builder.RegisterGenerics(typeof(IQueryHandler<,>));
            builder.RegisterGenerics(typeof(IAsyncQueryHandler<,>));

            builder
                .RegisterType<QueryService>()
                .As<IQueryService>()
                .InstancePerLifetimeScope();
        }
コード例 #2
0
        protected override void Load(ContainerBuilder builder)
        {
            builder
                .RegisterType<ValidatorFactory>()
                .As<FluentValidation.IValidatorFactory>();

            builder
                .RegisterGenerics(typeof (FluentValidation.AbstractValidator<>));

            builder
                .RegisterType<FluentValidationValidatorFactory>()
                .As<Core.Validation.IValidatorFactory>();
        }
コード例 #3
0
 protected override void Load(ContainerBuilder builder)
 {
     builder
         .RegisterGenerics(typeof (IAsyncCommandHandler<>));
 }