Amnesia.Session.Dispose C# (CSharp) Метод

Dispose() публичный Метод

public Dispose ( ) : void
Результат void
        public void Dispose()
        {
            isDisposed = true;
            Session.ID = Guid.Empty;

            try
            {
                // Notify the server of the end of the session. This will rollback the transaction server-side.
                var response = (new Handler.EndSessionRequest()).Send(serviceUrl);
                LogResponse(response);
            }
            finally
            {
                // Now that server is aware, tear down the local transaction scope.
                Transaction.Current.Rollback();
                TxScope.Dispose();

                // raise Disposed event
                if (onDisposed != null)
                    onDisposed(this, EventArgs.Empty);
            }
        }