private static void Windows_Data_PropertyChangedEventArgs_Delegate_Handler(IntPtr result, IntPtr pNative) { List <EventHandler <PropertyChangedEventArgs> > list = null; LongExposureInfraredFrameReader.Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out list); object obj = list; lock (obj) { LongExposureInfraredFrameReader objThis = NativeObjectCache.GetObject <LongExposureInfraredFrameReader>(pNative); PropertyChangedEventArgs args = new PropertyChangedEventArgs(result); using (List <EventHandler <PropertyChangedEventArgs> > .Enumerator enumerator = list.GetEnumerator()) { while (enumerator.MoveNext()) { EventHandler <PropertyChangedEventArgs> func = enumerator.Current; EventPump.Instance.Enqueue(delegate { try { func(objThis, args); } catch { } }); } } } }
// Token: 0x06002D3B RID: 11579 RVA: 0x000DF5CC File Offset: 0x000DD9CC private void Dispose(bool disposing) { if (this._pNative == IntPtr.Zero) { return; } this.__EventCleanup(); NativeObjectCache.RemoveObject <LongExposureInfraredFrameReader>(this._pNative); if (disposing) { LongExposureInfraredFrameReader.Windows_Kinect_LongExposureInfraredFrameReader_Dispose(this._pNative); } LongExposureInfraredFrameReader.Windows_Kinect_LongExposureInfraredFrameReader_ReleaseObject(ref this._pNative); this._pNative = IntPtr.Zero; }
// Token: 0x06002D4B RID: 11595 RVA: 0x000DFB14 File Offset: 0x000DDF14 public LongExposureInfraredFrame AcquireLatestFrame() { if (this._pNative == IntPtr.Zero) { throw new ObjectDisposedException("LongExposureInfraredFrameReader"); } IntPtr intPtr = LongExposureInfraredFrameReader.Windows_Kinect_LongExposureInfraredFrameReader_AcquireLatestFrame(this._pNative); ExceptionHelper.CheckLastError(); if (intPtr == IntPtr.Zero) { return(null); } return(NativeObjectCache.CreateOrGetObject <LongExposureInfraredFrame>(intPtr, (IntPtr n) => new LongExposureInfraredFrame(n))); }
// Token: 0x06002D4E RID: 11598 RVA: 0x000DFBAC File Offset: 0x000DDFAC private void __EventCleanup() { LongExposureInfraredFrameReader.Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(this._pNative); List <EventHandler <LongExposureInfraredFrameArrivedEventArgs> > list = LongExposureInfraredFrameReader.Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate_callbacks[this._pNative]; object obj = list; lock (obj) { if (list.Count > 0) { list.Clear(); if (this._pNative != IntPtr.Zero) { IntPtr pNative = this._pNative; if (LongExposureInfraredFrameReader.f__mg2 == null) { LongExposureInfraredFrameReader.f__mg2 = new LongExposureInfraredFrameReader._Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate(LongExposureInfraredFrameReader.Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate_Handler); } LongExposureInfraredFrameReader.Windows_Kinect_LongExposureInfraredFrameReader_add_FrameArrived(pNative, LongExposureInfraredFrameReader.f__mg2, true); } LongExposureInfraredFrameReader._Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate_Handle.Free(); } } LongExposureInfraredFrameReader.Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(this._pNative); List <EventHandler <PropertyChangedEventArgs> > list2 = LongExposureInfraredFrameReader.Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[this._pNative]; object obj2 = list2; lock (obj2) { if (list2.Count > 0) { list2.Clear(); if (this._pNative != IntPtr.Zero) { IntPtr pNative2 = this._pNative; if (LongExposureInfraredFrameReader.f__mg3 == null) { LongExposureInfraredFrameReader.f__mg3 = new LongExposureInfraredFrameReader._Windows_Data_PropertyChangedEventArgs_Delegate(LongExposureInfraredFrameReader.Windows_Data_PropertyChangedEventArgs_Delegate_Handler); } LongExposureInfraredFrameReader.Windows_Kinect_LongExposureInfraredFrameReader_add_PropertyChanged(pNative2, LongExposureInfraredFrameReader.f__mg3, true); } LongExposureInfraredFrameReader._Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); } } }
// Token: 0x06002D36 RID: 11574 RVA: 0x000DF579 File Offset: 0x000DD979 internal LongExposureInfraredFrameReader(IntPtr pNative) { this._pNative = pNative; LongExposureInfraredFrameReader.Windows_Kinect_LongExposureInfraredFrameReader_AddRefObject(ref this._pNative); }