Exemplo n.º 1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IHttpClientFactory clientFactory)
        {
            AppInfoHelper.EnvironmentName      = env.EnvironmentName;
            HttpClientHelper.HttpClientFactory = clientFactory;

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseStaticFiles();
            app.UseRouting();

            app.UseOssCore(new CoreContextOption()
            {
                JSRequestHeaderName = "x-core-app"
            });

            if (!env.IsDevelopment())
            {
                app.UseOssCoreException();
            }

            app.UseEndpoints(endpoints => { endpoints.MapControllers(); });

            GlobalRegister.RegisterConfig();
        }
Exemplo n.º 2
0
        static BaseTests()
        {
            SetConfig();

            GlobalRegister.RegisterConfig();

            InitialTestContext();
        }
Exemplo n.º 3
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        {
            AppInfoHelper.EnvironmentName = env.EnvironmentName;

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseStaticFiles();
            app.UseRouting();

            if (!env.IsDevelopment())
            {
                app.UseExceptionMiddleware();
            }

            app.UseEndpoints(endpoints => { endpoints.MapControllers(); });

            GlobalRegister.RegisterConfig();
        }
Exemplo n.º 4
0
 static BaseTests()
 {
     SetConfig();
     GlobalRegister.RegisterConfig();
 }