示例#1
0
        void ConfigureServices() =>
        _builder.ConfigureServices((context, services) =>
        {
            services.AddTotemRuntime();

            services.AddTimelineClient <TArea>(timeline =>
            {
                var eventStore = timeline.AddEventStore().BindOptionsToConfiguration();

                _configure.ConfigureEventStore(context, eventStore);

                _configure.ConfigureTimeline(context, timeline);
            });

            var mvc = services
                      .AddMvc()
                      .AddApplicationPart(Assembly.GetEntryAssembly())
                      .AddCommandsAndQueries()
                      .SetCompatibilityVersion(CompatibilityVersion.Version_3_0)
                      .AddMvcOptions((mvcOptions) => { mvcOptions.EnableEndpointRouting = false; });

            _configure.ConfigureMvc(context, mvc);

            var signalR = services.AddSignalR().AddQueryNotifications();

            _configure.ConfigureSignalR(context, signalR);

            _configure.ConfigureServices(context, services);
        });
示例#2
0
        void ConfigureServices() =>
        _builder.ConfigureServices((context, services) =>
        {
            services.AddTotemRuntime();

            services.AddTimelineClient <TArea>(timeline =>
            {
                var eventStore = timeline.AddEventStore().BindOptionsToConfiguration();

                _configure.ConfigureEventStore(context, eventStore);

                _configure.ConfigureTimeline(context, timeline);
            });

            var mvc = services
                      .AddMvc()
                      .AddCommandsAndQueries()
                      .AddApplicationPart(Assembly.GetEntryAssembly());

            _configure.ConfigureMvc(context, mvc);

            var signalR = services.AddSignalR().AddQueryNotifications();

            _configure.ConfigureSignalR(context, signalR);

            _configure.ConfigureServices(context, services);
        });