internal void RemoveSink(WmiEventSink eventSink) { try { lock (m_sinkCollection) { m_sinkCollection.Remove(eventSink.GetHashCode()); } // Release the stub as we are now disconnected eventSink.ReleaseStub(); } catch {} }
internal void RemoveSink(WmiEventSink eventSink) { try { lock (this.m_sinkCollection) { this.m_sinkCollection.Remove(eventSink.GetHashCode()); } eventSink.ReleaseStub(); } catch { } }
internal WmiEventSink GetNewSink(ManagementScope scope, object context) { try { WmiEventSink sink = WmiEventSink.GetWmiEventSink(this, context, scope, null, null); lock (this.m_sinkCollection) { this.m_sinkCollection.Add(sink.GetHashCode(), sink); } return(sink); } catch { return(null); } }
internal WmiEventSink GetNewPutSink(ManagementScope scope, object context, string path, string className) { try { WmiEventSink sink = WmiEventSink.GetWmiEventSink(this, context, scope, path, className); lock (this.m_sinkCollection) { this.m_sinkCollection.Add(sink.GetHashCode(), sink); } return(sink); } catch { return(null); } }
internal WmiEventSink GetNewSink( ManagementScope scope, object context) { try { WmiEventSink eventSink = WmiEventSink.GetWmiEventSink(this, context, scope, null, null); // Add it to our collection lock (m_sinkCollection) { m_sinkCollection.Add(eventSink.GetHashCode(), eventSink); } return(eventSink); } catch { return(null); } }
internal WmiEventSink GetNewPutSink( ManagementScope scope, object context, string path, string className) { try { WmiEventSink eventSink = new WmiEventSink(this, context, scope, path, className); // Add it to our collection lock (m_sinkCollection) { m_sinkCollection.Add(eventSink.GetHashCode(), eventSink); } return(eventSink); } catch { return(null); } }
internal WmiEventSink GetNewSink(ManagementScope scope, object context) { WmiEventSink wmiEventSink; try { WmiEventSink wmiEventSink1 = WmiEventSink.GetWmiEventSink(this, context, scope, null, null); lock (this.m_sinkCollection) { this.m_sinkCollection.Add(wmiEventSink1.GetHashCode(), wmiEventSink1); } wmiEventSink = wmiEventSink1; } catch { wmiEventSink = null; } return(wmiEventSink); }
internal void RemoveSink (WmiEventSink eventSink) { try { lock (m_sinkCollection) { m_sinkCollection.Remove (eventSink.GetHashCode ()); } // Release the stub as we are now disconnected eventSink.ReleaseStub (); } catch { } }