コード例 #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, IReflector reflector, ILoggerFactory loggerFactory)
        {
            // for Demo use Log4Net. Configured in log4net.config
            loggerFactory.AddLog4Net();

            reflector.Reflect();

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

            app.UseCors(MyAllowSpecificOrigins);
            app.UseRouting();
            app.UseMvc(routeBuilder => RestfulObjectsConfig.RegisterRestfulObjectsRoutes(routeBuilder));
        }
コード例 #2
0
 public static void PostStart()
 {
     RestfulObjectsConfig.RestPostStart();
 }
コード例 #3
0
 public Startup(IConfiguration configuration)
 {
     Configuration = configuration;
     RestfulObjectsConfig.RestPreStart();
 }
コード例 #4
0
 public static void PreStart()
 {
     RestfulObjectsConfig.RestPreStart();
     RestfulObjectsConfig.RegisterRestfulObjectsRoutes(RouteTable.Routes);
 }