private static void Microsoft_Kinect_Face_CollectionStatusChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) { List <RootSystem.EventHandler <Microsoft.Kinect.Face.CollectionStatusChangedEventArgs> > callbackList = null; Microsoft_Kinect_Face_CollectionStatusChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); lock (callbackList) { var objThis = Helper.NativeObjectCache.GetObject <FaceModelBuilder>(pNative); var args = new Microsoft.Kinect.Face.CollectionStatusChangedEventArgs(result); foreach (var func in callbackList) { Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); } } }
private static void Microsoft_Kinect_Face_CollectionStatusChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) { List<RootSystem.EventHandler<Microsoft.Kinect.Face.CollectionStatusChangedEventArgs>> callbackList = null; Microsoft_Kinect_Face_CollectionStatusChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); lock(callbackList) { var objThis = Helper.NativeObjectCache.GetObject<FaceModelBuilder>(pNative); var args = new Microsoft.Kinect.Face.CollectionStatusChangedEventArgs(result); foreach(var func in callbackList) { Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); } } }