private static void Windows_Kinect_BodyIndexFrameArrivedEventArgs_Delegate_Handler(IntPtr result, IntPtr pNative) { List <EventHandler <BodyIndexFrameArrivedEventArgs> > list = null; BodyIndexFrameReader.Windows_Kinect_BodyIndexFrameArrivedEventArgs_Delegate_callbacks.TryGetValue(pNative, out list); object obj = list; lock (obj) { BodyIndexFrameReader objThis = NativeObjectCache.GetObject <BodyIndexFrameReader>(pNative); BodyIndexFrameArrivedEventArgs args = new BodyIndexFrameArrivedEventArgs(result); using (List <EventHandler <BodyIndexFrameArrivedEventArgs> > .Enumerator enumerator = list.GetEnumerator()) { while (enumerator.MoveNext()) { EventHandler <BodyIndexFrameArrivedEventArgs> func = enumerator.Current; EventPump.Instance.Enqueue(delegate { try { func(objThis, args); } catch { } }); } } } }
private static void Windows_Kinect_BodyIndexFrameArrivedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) { List <RootSystem.EventHandler <BodyIndexFrameArrivedEventArgs> > callbackList = null; Windows_Kinect_BodyIndexFrameArrivedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); lock (callbackList) { var objThis = NativeObjectCache.GetObject <BodyIndexFrameReader>(pNative); var args = new BodyIndexFrameArrivedEventArgs(result); foreach (var func in callbackList) { EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); } } }
// Token: 0x06002B35 RID: 11061 RVA: 0x000D9D2C File Offset: 0x000D812C private void Dispose(bool disposing) { if (this._pNative == IntPtr.Zero) { return; } this.__EventCleanup(); NativeObjectCache.RemoveObject <BodyIndexFrameArrivedEventArgs>(this._pNative); BodyIndexFrameArrivedEventArgs.Windows_Kinect_BodyIndexFrameArrivedEventArgs_ReleaseObject(ref this._pNative); this._pNative = IntPtr.Zero; }
// Token: 0x06002B30 RID: 11056 RVA: 0x000D9CD8 File Offset: 0x000D80D8 internal BodyIndexFrameArrivedEventArgs(IntPtr pNative) { this._pNative = pNative; BodyIndexFrameArrivedEventArgs.Windows_Kinect_BodyIndexFrameArrivedEventArgs_AddRefObject(ref this._pNative); }