Example #1
0
        private static void Windows_Data_PropertyChangedEventArgs_Delegate_Handler(IntPtr result, IntPtr pNative)
        {
            List <EventHandler <PropertyChangedEventArgs> > list = null;

            AudioBeam.Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out list);
            object obj = list;

            lock (obj)
            {
                AudioBeam objThis             = NativeObjectCache.GetObject <AudioBeam>(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
                            {
                            }
                        });
                    }
                }
            }
        }
Example #2
0
 // Token: 0x06002A3C RID: 10812 RVA: 0x000D6E78 File Offset: 0x000D5278
 private void Dispose(bool disposing)
 {
     if (this._pNative == IntPtr.Zero)
     {
         return;
     }
     this.__EventCleanup();
     NativeObjectCache.RemoveObject <AudioBeam>(this._pNative);
     AudioBeam.Windows_Kinect_AudioBeam_ReleaseObject(ref this._pNative);
     this._pNative = IntPtr.Zero;
 }
Example #3
0
        // Token: 0x06002A4F RID: 10831 RVA: 0x000D7258 File Offset: 0x000D5658
        private void __EventCleanup()
        {
            AudioBeam.Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(this._pNative);
            List <EventHandler <PropertyChangedEventArgs> > list = AudioBeam.Windows_Data_PropertyChangedEventArgs_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 (AudioBeam.f__mg1 == null)
                        {
                            AudioBeam.f__mg1 = new AudioBeam._Windows_Data_PropertyChangedEventArgs_Delegate(AudioBeam.Windows_Data_PropertyChangedEventArgs_Delegate_Handler);
                        }
                        AudioBeam.Windows_Kinect_AudioBeam_add_PropertyChanged(pNative, AudioBeam.f__mg1, true);
                    }
                    AudioBeam._Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free();
                }
            }
        }
Example #4
0
 // Token: 0x06002A37 RID: 10807 RVA: 0x000D6E26 File Offset: 0x000D5226
 internal AudioBeam(IntPtr pNative)
 {
     this._pNative = pNative;
     AudioBeam.Windows_Kinect_AudioBeam_AddRefObject(ref this._pNative);
 }