private static void Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate_Handler(
            RootSystem.IntPtr result, RootSystem.IntPtr pNative)
        {
            List <RootSystem.EventHandler <LongExposureInfraredFrameArrivedEventArgs> > callbackList = null;

            Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate_callbacks.TryGetValue(pNative,
                                                                                                    out callbackList);
            lock (callbackList)
            {
                var objThis = NativeObjectCache.GetObject <LongExposureInfraredFrameReader>(pNative);
                var args    = new LongExposureInfraredFrameArrivedEventArgs(result);
                foreach (var func in callbackList)
                {
                    EventPump.Instance.Enqueue(() =>
                    {
                        try
                        {
                            func(objThis, args);
                        }
                        catch
                        {
                        }
                    });
                }
            }
        }
示例#2
0
        private static void Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate_Handler(IntPtr result, IntPtr pNative)
        {
            List <EventHandler <LongExposureInfraredFrameArrivedEventArgs> > list = null;

            LongExposureInfraredFrameReader.Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate_callbacks.TryGetValue(pNative, out list);
            object obj = list;

            lock (obj)
            {
                LongExposureInfraredFrameReader           objThis = NativeObjectCache.GetObject <LongExposureInfraredFrameReader>(pNative);
                LongExposureInfraredFrameArrivedEventArgs args    = new LongExposureInfraredFrameArrivedEventArgs(result);
                using (List <EventHandler <LongExposureInfraredFrameArrivedEventArgs> > .Enumerator enumerator = list.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        EventHandler <LongExposureInfraredFrameArrivedEventArgs> func = enumerator.Current;
                        EventPump.Instance.Enqueue(delegate
                        {
                            try
                            {
                                func(objThis, args);
                            }
                            catch
                            {
                            }
                        });
                    }
                }
            }
        }
示例#3
0
 // Token: 0x06002D31 RID: 11569 RVA: 0x000DF4BC File Offset: 0x000DD8BC
 private void Dispose(bool disposing)
 {
     if (this._pNative == IntPtr.Zero)
     {
         return;
     }
     this.__EventCleanup();
     NativeObjectCache.RemoveObject <LongExposureInfraredFrameArrivedEventArgs>(this._pNative);
     LongExposureInfraredFrameArrivedEventArgs.Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_ReleaseObject(ref this._pNative);
     this._pNative = IntPtr.Zero;
 }
示例#4
0
 // Token: 0x06002D2C RID: 11564 RVA: 0x000DF469 File Offset: 0x000DD869
 internal LongExposureInfraredFrameArrivedEventArgs(IntPtr pNative)
 {
     this._pNative = pNative;
     LongExposureInfraredFrameArrivedEventArgs.Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_AddRefObject(ref this._pNative);
 }