示例#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));
        }
 public static void PostStart()
 {
     RestfulObjectsConfig.RestPostStart();
 }
示例#3
0
 public Startup(IConfiguration configuration)
 {
     Configuration = configuration;
     RestfulObjectsConfig.RestPreStart();
 }
 public static void PreStart()
 {
     RestfulObjectsConfig.RestPreStart();
     RestfulObjectsConfig.RegisterRestfulObjectsRoutes(RouteTable.Routes);
 }