private static void Windows_Kinect_IsAvailableChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) { List <RootSystem.EventHandler <IsAvailableChangedEventArgs> > callbackList = null; Windows_Kinect_IsAvailableChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); lock (callbackList) { var objThis = NativeObjectCache.GetObject <KinectSensor>(pNative); var args = new IsAvailableChangedEventArgs(result); foreach (var func in callbackList) { EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); } } }
private static void Windows_Kinect_IsAvailableChangedEventArgs_Delegate_Handler(IntPtr result, IntPtr pNative) { List <EventHandler <IsAvailableChangedEventArgs> > list = null; KinectSensor.Windows_Kinect_IsAvailableChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out list); object obj = list; lock (obj) { KinectSensor objThis = NativeObjectCache.GetObject <KinectSensor>(pNative); IsAvailableChangedEventArgs args = new IsAvailableChangedEventArgs(result); using (List <EventHandler <IsAvailableChangedEventArgs> > .Enumerator enumerator = list.GetEnumerator()) { while (enumerator.MoveNext()) { EventHandler <IsAvailableChangedEventArgs> func = enumerator.Current; EventPump.Instance.Enqueue(delegate { try { func(objThis, args); } catch { } }); } } } }
// Token: 0x06002D09 RID: 11529 RVA: 0x000DF1F0 File Offset: 0x000DD5F0 private void Dispose(bool disposing) { if (this._pNative == IntPtr.Zero) { return; } this.__EventCleanup(); NativeObjectCache.RemoveObject <IsAvailableChangedEventArgs>(this._pNative); IsAvailableChangedEventArgs.Windows_Kinect_IsAvailableChangedEventArgs_ReleaseObject(ref this._pNative); this._pNative = IntPtr.Zero; }
// Token: 0x06002D04 RID: 11524 RVA: 0x000DF19C File Offset: 0x000DD59C internal IsAvailableChangedEventArgs(IntPtr pNative) { this._pNative = pNative; IsAvailableChangedEventArgs.Windows_Kinect_IsAvailableChangedEventArgs_AddRefObject(ref this._pNative); }