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; } }
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."); }
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."); }