internal WmiGetEventSink GetNewGetSink(ManagementScope scope, object context, ManagementObject managementObject) { try { WmiGetEventSink sink = WmiGetEventSink.GetWmiGetEventSink(this, context, scope, managementObject); lock (this.m_sinkCollection) { this.m_sinkCollection.Add(sink.GetHashCode(), sink); } return(sink); } catch { return(null); } }
internal WmiGetEventSink GetNewGetSink( ManagementScope scope, object context, ManagementObject managementObject) { try { WmiGetEventSink eventSink = WmiGetEventSink.GetWmiGetEventSink(this, context, scope, managementObject); // Add it to our collection lock (m_sinkCollection) { m_sinkCollection.Add(eventSink.GetHashCode(), eventSink); } return(eventSink); } catch { return(null); } }
internal WmiGetEventSink GetNewGetSink(ManagementScope scope, object context, ManagementObject managementObject) { WmiGetEventSink wmiGetEventSink; try { WmiGetEventSink wmiGetEventSink1 = WmiGetEventSink.GetWmiGetEventSink(this, context, scope, managementObject); lock (this.m_sinkCollection) { this.m_sinkCollection.Add(wmiGetEventSink1.GetHashCode(), wmiGetEventSink1); } wmiGetEventSink = wmiGetEventSink1; } catch { wmiGetEventSink = null; } return(wmiGetEventSink); }
private static void HackToCreateWmiGetEventSink() { wmiGetEventSinkNew = new WmiGetEventSink(watcherParameter, contextParameter, scopeParameter, managementObjectParameter); }
private static void HackToCreateWmiGetEventSink() { WmiGetEventSink.wmiGetEventSinkNew = new WmiGetEventSink(WmiGetEventSink.watcherParameter, WmiGetEventSink.contextParameter, WmiGetEventSink.scopeParameter, WmiGetEventSink.managementObjectParameter); }