Пример #1
0
        // 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
        public void OnAppStopping()
        {
            FlashPolicyfileHandler.Cancel();

            Program.Recorder.CloseDevice();
        }