コード例 #1
0
ファイル: O2Gui.cs プロジェクト: dhcgn/FluentSharp
 protected override void Dispose(bool disposing)
 {
     try
     {
         if (IsDisposed.isFalse())
         {
             base.Dispose(disposing);
         }
     }
     catch (Exception ex)
     {
         ex.log("in O2Gui dispose");
     }
 }
コード例 #2
0
        protected internal override void Dispose(bool disposing)
        {
            if (false.Equals(disposing) || false.Equals(ShouldDispose))
            {
                return;
            }

            base.Dispose(disposing);

            if (IsDisposed.Equals(false))
            {
                return;
            }

            LastLog = LastException = ExceptionExtensions.NilException;
        }
コード例 #3
0
ファイル: FileLogger.cs プロジェクト: wangweinjcn/RtspMedia
        protected internal override void Dispose(bool disposing)
        {
            if (disposing.Equals(false))
            {
                return;
            }

            base.Dispose(ShouldDispose);

            if (IsDisposed.Equals(false))
            {
                return;
            }

            m_FileInfo = null;

            m_Encoding = null;
        }
コード例 #4
0
ファイル: TNEmulator.cs プロジェクト: zendever/Open3270
        protected virtual void Dispose(bool disposing)
        {
            lock (this)
            {
                if (IsDisposed)
                {
                    return;
                }
                isDisposed = true;

                if (sout != null && Debug)
                {
                    sout.WriteLine("TNEmulator.Dispose(" + IsDisposed.ToString() + ")");
                }

                if (disposing)
                {
                    //----------------------------
                    // release managed resources

                    if (currentConnection != null)
                    {
                        if (sout != null && Debug)
                        {
                            sout.WriteLine("TNEmulator.Dispose() Disposing of currentConnection");
                        }
                        try
                        {
                            currentConnection.Disconnect();
                            this.currentConnection.CursorLocationChanged -= currentConnection_CursorLocationChanged;

                            if (apiOnDisconnectDelegate != null)
                            {
                                currentConnection.Disconnected -= apiOnDisconnectDelegate;
                            }

                            currentConnection.Dispose();
                        }
                        catch
                        {
                            if (sout != null && Debug)
                            {
                                sout.WriteLine("TNEmulator.Dispose() Exception during currentConnection.Dispose");
                            }
                        }
                        currentConnection = null;
                    }

                    Disconnected = null;

                    if (sout != null && Debug)
                    {
                        sout.WriteLine("TNEmulator.Dispose() Disposing of currentScreenXML");
                    }

                    DisposeOfCurrentScreenXML();

                    if (objectState != null)
                    {
                        objectState = null;
                    }
                    if (mConnectionConfiguration != null)
                    {
                        mConnectionConfiguration = null;
                    }
                    if (mScreenName != null)
                    {
                        mScreenName = null;
                    }
                }

                //------------------------------
                // release unmanaged resources
            }
        }