public static IMdaConfigureContext AddInfrastructure(this IMdaConfigureContext context)
        {
            context.Services.AddTyping();
            context.Services.AddSerialization();
            context.Services.AddScheduling();

            return(context);
        }
        public static IMdaConfigureContext AddStateBackend(
            this IMdaConfigureContext context,
            Action <IStateBackendConfigureContext> configure)
        {
            configure(new DefaultStateBackendConfigureContext(context.Services));

            return(context);
        }
Пример #3
0
        public static IMdaConfigureContext AddMessageBus(
            this IMdaConfigureContext context,
            Action <IMessageBusConfigureContext> configure,
            params Assembly[] assemblies)
        {
            context.Services.AddMessageBusCore(assemblies);

            configure(new DefaultMessageBusConfigureContext(context.Services));

            return(context);
        }
        public static IMdaConfigureContext AddApplication(
            this IMdaConfigureContext context,
            Action <IApplicationConfigureContext> configure,
            params Assembly[] assemblies)
        {
            context.Services.AddApplicationCommandCore(assemblies);
            context.Services.AddApplicationNotificationCore();

            configure(new DefaultApplicationConfigureContext(context.Services));

            return(context);
        }
        public static IMdaConfigureContext AddDomain(
            this IMdaConfigureContext context,
            Action <IDomainConfigureContext> configure,
            IConfiguration configuration,
            params Assembly[] assemblies)
        {
            context.Services.AddDomainCommandCore(assemblies);
            context.Services.AddDomainModelCore(configuration);
            context.Services.AddDomainEventCore(assemblies);
            context.Services.AddDomainNotificationCore(assemblies);

            configure(new DefaultDomainConfigureContext(context.Services));

            return(context);
        }