コード例 #1
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddApiFactory();
            AuthRegistry.RegisterServices(services, KnownServices.Authenticator);
            services.AddScoped <ServiceAuthOptions>((provider) => {
                return(new ServiceAuthOptions(KnownServices.CommandHandler, string.Empty));
            });
            services.AddApiService <IEventStreamApi>(KnownServices.EventStream);
            Registry.RegisterServices(services);

            services.AddMvc(AuthRegistry.RegisterFilters).SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
        }
コード例 #2
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddApiFactory();
            AuthRegistry.RegisterServices(services, KnownServices.Authenticator);
            services.AddScoped <ServiceAuthOptions>((provider) => {
                return(new ServiceAuthOptions(KnownServices.Snapshot, string.Empty));
            });

            services.AddScoped <ISnapshotUpdateService, SnapshotUpdateService>();

            services.AddMvc(AuthRegistry.RegisterFilters).SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
        }
コード例 #3
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddApiFactory();
            AuthRegistry.RegisterServices(services, KnownServices.Authenticator);
            services.AddScoped <ServiceAuthOptions>((provider) => {
                return(new ServiceAuthOptions(KnownServices.EventCoordinator, string.Empty));
            });

            services.AddApiService <ISnapshotApi>(KnownServices.Snapshot);
            services.AddSingleton <IQueue, Queue>();
            services.AddScoped <QueueCheckJob>();

            services.AddHangfire(SetupHangfire);

            services.AddMvc(AuthRegistry.RegisterFilters).SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
        }