public override void Stop()
        {
            _httpInboundAdapter.Stop();
            _httpRouter.Stop();
            foreach (IHttpProcessor p in _httpProcessors.Values)
            {
                p.StopProcessor();
            }

            _httpOutboundAdapter.Stop();
        }
예제 #2
0
파일: Program.cs 프로젝트: 7474/RealDiceBot
        static void Main(string[] args)
        {
            Init().Wait();

            // Wait until the app unloads or is cancelled
            var cts = new CancellationTokenSource();

            AssemblyLoadContext.Default.Unloading += (ctx) => cts.Cancel();
            Console.CancelKeyPress += (sender, cpe) => cts.Cancel();
            WhenCancelled(cts.Token).Wait();
            http.Stop();
        }