コード例 #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (!m_Disposed)
     {
         CollaborationHelperFunctions.CleanEventVars(ref m_regAppChangedWaitHandle,
                                                     ref m_safeAppChangedEvent,
                                                     ref m_appChangedEvent);
         Logging.P2PTraceSource.TraceEvent(TraceEventType.Information, 0, "Clean ApplicationChanged variables successful.");
         m_Disposed = true;
     }
 }
コード例 #2
0
ファイル: PeerEndPoint.cs プロジェクト: dox0/DotNet471RS3
 private void RemoveNameChanged(EventHandler <NameChangedEventArgs> callback)
 {
     Logging.P2PTraceSource.TraceEvent(TraceEventType.Information, 0, "RemoveNameChanged() called.");
     lock (LockNameChangedEvent){
         m_nameChanged -= callback;
         if (m_nameChanged == null)
         {
             CollaborationHelperFunctions.CleanEventVars(ref m_regNameChangedWaitHandle,
                                                         ref m_safeNameChangedEvent,
                                                         ref m_nameChangedEvent);
             Logging.P2PTraceSource.TraceEvent(TraceEventType.Information, 0, "Clean NameChanged variables successful.");
         }
     }
     Logging.P2PTraceSource.TraceEvent(TraceEventType.Information, 0, "RemoveNameChanged() successful.");
 }
コード例 #3
0
        private static void RemovePeerNearMeChanged(EventHandler <PeerNearMeChangedEventArgs> cb)
        {
            Logging.P2PTraceSource.TraceEvent(TraceEventType.Information, 0, "RemovePeerNearMeChanged() called.");
            lock (LockPNMChangedEvent){
                s_peerNearMeChanged -= cb;
                if (s_peerNearMeChanged == null)
                {
                    CollaborationHelperFunctions.CleanEventVars(ref s_registeredPNMWaitHandle,
                                                                ref s_safePeerNearMeChangedEvent,
                                                                ref s_peerNearMeChangedEvent);

                    Logging.P2PTraceSource.TraceEvent(TraceEventType.Information, 0, "Clean PeerNearMeChanged variables successful.");
                }
            }
            Logging.P2PTraceSource.TraceEvent(TraceEventType.Information, 0, "RemovePeerNearMeChanged() successful.");
        }