예제 #1
0
파일: Startup.cs 프로젝트: yoyofx/UBoxCore
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, IApplicationLifetime lifetime)
        {
            app.UseStaticFiles(new StaticFileOptions
            {
                FileProvider = new PhysicalFileProvider(
                    Path.Combine(Directory.GetCurrentDirectory(), "Resources")),
                RequestPath = "/Web"
            });


            app.Map("/ws", SocketHandler.Map);

            lifetime.ApplicationStarted.Register(OnAppStarted);

            lifetime.ApplicationStopping.Register(OnAppStopping);

            lifetime.ApplicationStopped.Register(OnAppStopped);


            FlashPolicyfileHandler.StartAsync();
        }
예제 #2
0
파일: Startup.cs 프로젝트: yoyofx/UBoxCore
        public void OnAppStopping()
        {
            FlashPolicyfileHandler.Cancel();

            Program.Recorder.CloseDevice();
        }