Example #1
0
            }             // ctor

            public void Dispose()
            {
                Info("Debug session closed.");
                // Dispose session
                cancelSessionTokenSource.Cancel();
                cancelSessionTokenSource.Dispose();

                // close context
                context.Dispose();
            }             // proc Dispose
Example #2
0
            }             // ctor

            public void Dispose()
            {
                // close if still open
                if (context.WebSocket.State == WebSocketState.Open)
                {
                    Task.Run(() => CloseAsync(CancellationToken.None)).Wait(1000);                     // give 1s to close
                }
                // dispose the context
                context.Dispose();

                // remove session
                server.RemoveEventSession(this);
            }             // proc Dispose