public static void ConfigureService(IServiceCollection services, IConfiguration configuration)
        {
            var section = configuration.GetSection("MassTransit");

            ConfigureServicesMassTransit.ConfigureServices(services, configuration, new MassTransitConfiguration()
            {
                IsDebug      = section.GetValue <bool>("IsDebug"),
                ServiceName  = "Gateway",
                Configurator = busMassTransit =>
                {
                    busMassTransit.AddRequestClient <ArticlesByIdAuthorRequestDto>();
                    busMassTransit.AddRequestClient <ArticleByIdRequestDto>();
                    busMassTransit.AddRequestClient <ArticlesRequestDto>();
                    busMassTransit.AddRequestClient <ArticleCreateRequestDto>();
                    busMassTransit.AddRequestClient <ArticleGoArchiveRequestDto>();

                    busMassTransit.AddRequestClient <AuthorRequestDto>();
                    busMassTransit.AddRequestClient <AuthorsRequestDto>();
                    busMassTransit.AddRequestClient <GuidAuthorRequestDto>();
                    busMassTransit.AddRequestClient <NikeNameAuthorRequestDto>();

                    busMassTransit.AddRequestClient <EditorRequestDto>();
                    busMassTransit.AddRequestClient <EditorsRequestDto>();
                    busMassTransit.AddRequestClient <GuidEditorRequestDto>();
                    busMassTransit.AddRequestClient <NikeNameEditorRequestDto>();

                    busMassTransit.AddRequestClient <UserRequestDto>();
                    busMassTransit.AddRequestClient <UsersRequestDto>();
                    busMassTransit.AddRequestClient <GuidUserRequestDto>();
                    busMassTransit.AddRequestClient <NikeNameUserRequestDto>();

                    busMassTransit.AddRequestClient <AccountsForCreateArticleRequestDto>();
                }
            });
        }
Exemple #2
0
        public static void ConfigureService(IServiceCollection services, IConfiguration configuration)
        {
            var section = configuration.GetSection("MassTransit");

            ConfigureServicesMassTransit.ConfigureServices(services, configuration, new MassTransitConfiguration()
            {
                IsDebug      = section.GetValue <bool>("IsDebug"),
                ServiceName  = "Accounts",
                Configurator = busMassTransit =>
                {
                    busMassTransit.AddConsumer <GetEditorConsumer>();
                    busMassTransit.AddConsumer <GetEditorsConsumer>();
                    busMassTransit.AddConsumer <GetGuidEditorConsumer>();
                    busMassTransit.AddConsumer <GetNikeNameEditorConsumer>();

                    busMassTransit.AddConsumer <GetAuthorConsumer>();
                    busMassTransit.AddConsumer <GetAuthorsConsumer>();
                    busMassTransit.AddConsumer <GetNikeNameAuthorConsumer>();
                    busMassTransit.AddConsumer <GetGuidAuthorConsumer>();

                    busMassTransit.AddConsumer <GetUserConsumer>();
                    busMassTransit.AddConsumer <GetUsersConsumer>();
                    busMassTransit.AddConsumer <GetGuidUserConsumer>();
                    busMassTransit.AddConsumer <GetNikeNameUserConsumer>();

                    busMassTransit.AddConsumer <AccountsForCreateArticleConsumer>();
                }
            });
        }
        public static void ConfigureService(IServiceCollection services, IConfiguration configuration)
        {
            var section = configuration.GetSection("MassTransit");

            ConfigureServicesMassTransit.ConfigureServices(services, configuration, new MassTransitConfiguration()
            {
                IsDebug      = section.GetValue <bool>("IsDebug"),
                ServiceName  = "Articles",
                Configurator = busMassTransit =>
                {
                    busMassTransit.AddConsumer <GetArticlesByIdAuthorConsumer>();
                    busMassTransit.AddConsumer <GetArticlesConsumer>();
                    busMassTransit.AddConsumer <GetArticleConsumer>();
                    busMassTransit.AddConsumer <GoArchiveArticleConsumer>();
                    busMassTransit.AddConsumer <CreateArticleConsumer>();
                }
            });
        }