public virtual void Dispose() { SessionInterface?.Dispose(); _network.OnDisconnectedFromSession -= OnDisconnectFromSession; if (LOG) #pragma warning disable CS0162 // Unreachable code detected { Log.Info("Online interface terminating"); } #pragma warning restore CS0162 // Unreachable code detected OnTerminate?.Invoke(); }
protected virtual void OnDisconnectFromSession() { SessionInterface?.Dispose(); SessionInterface = null; }