Beispiel #1
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            DBConfiguration db = DBConfiguration.Load(Configuration);

            ConfigureDBServices(db, services);

            LinkedServerConfiguration server = LinkedServerConfiguration.Load(Configuration);

            ConfigureIdentityServices(server, Configuration, services);

            ConfigureFinalServices(Configuration, services);
        }
Beispiel #2
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            var server   = LinkedServerConfiguration.Load(Configuration);
            var idClient = IdentityClientConfiguration.Load(Configuration);

            ConfigureIdentityServices(server, idClient, services);

            ConfigureClientServices(server, services);

            services.AddScoped <IIdentityDataGetter, IdentityDataGetter>();

            ConfigureFinalServices(Configuration, services);
        }
Beispiel #3
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            DBConfiguration db = DBConfiguration.Load(Configuration);

            ConfigureDBServices(db, services);

            LinkedServerConfiguration server = LinkedServerConfiguration.Load(Configuration);

            ConfigureIdentityServices(server, services);

            ConfigureDocumentServices(server, services);

            services.AddScoped <IIdentityDataGetter, IdentityDataGetter>();

            ConfigureFinalServices(Configuration, services);
        }
Beispiel #4
0
        // This method gets called by the runtime. Use this method to add services to the container.
        // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
        public void ConfigureServices(IServiceCollection services)
        {
            JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear();

            Utils.Linked         = LinkedServerConfiguration.Load(Configuration);
            Utils.IdentityClient = IdentityClientConfiguration.Load(Configuration);

            services.AddHttpClient();

            services.AddMvc().AddNewtonsoftJson();

            services.AddResponseCompression(opts =>
            {
                opts.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(
                    new[] { "application/octet-stream" });
            });
        }