Renci.SshNet.Shell.UnsubscribeFromSessionEvents C# (CSharp) Method

UnsubscribeFromSessionEvents() private method

Unsubscribes the current Shell from session events.
Does nothing when session is null.
private UnsubscribeFromSessionEvents ( ISession session ) : void
session ISession The session.
return void
        private void UnsubscribeFromSessionEvents(ISession session)
        {
            if (session == null)
                return;

            session.Disconnected -= Session_Disconnected;
            session.ErrorOccured -= Session_ErrorOccured;
        }