Пример #1
0
        /// <summary>
        /// Kicks and disposes all sessions and channels
        /// </summary>
        /// <param name="disposing"></param>
        void Dispose(bool disposing)
        {
            this.Disposed = true;
            if (disposing)
            {
                foreach (var session in sessionCache)
                {
                    server.KillSession(session.SessionId);
                    session.Destroy(DestroySessionReason.KickedByServer);
                }
                this.sessionCache.Dispose();

                foreach (var channel in this.channels)
                {
                    channel.Dispose();
                }
                this.channels.Dispose();
            }
        }