private static void Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) { List<RootSystem.EventHandler<Windows.Kinect.CoordinateMappingChangedEventArgs>> callbackList = null; Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); lock(callbackList) { var objThis = Helper.NativeObjectCache.GetObject<CoordinateMapper>(pNative); var args = new Windows.Kinect.CoordinateMappingChangedEventArgs(result); foreach(var func in callbackList) { Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); } } }
private static void Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) { List <RootSystem.EventHandler <Windows.Kinect.CoordinateMappingChangedEventArgs> > callbackList = null; Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); lock (callbackList) { var objThis = Helper.NativeObjectCache.GetObject <CoordinateMapper>(pNative); var args = new Windows.Kinect.CoordinateMappingChangedEventArgs(result); foreach (var func in callbackList) { Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); } } }
private static void Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) { List<RootSystem.EventHandler<Windows.Kinect.CoordinateMappingChangedEventArgs>> callbackList = null; Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); lock(callbackList) { var objThis = Helper.NativeObjectCache.GetObject<CoordinateMapper>(pNative); var args = new Windows.Kinect.CoordinateMappingChangedEventArgs(result); foreach(var func in callbackList) { #if UNITY_METRO || UNITY_XBOXONE UnityEngine.WSA.Application.InvokeOnAppThread(() => { try { func(objThis, args); } catch { } }, true); #else Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); #endif } } }
private static void Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) { List <RootSystem.EventHandler <Windows.Kinect.CoordinateMappingChangedEventArgs> > callbackList = null; Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); lock (callbackList) { var objThis = Helper.NativeObjectCache.GetObject <CoordinateMapper>(pNative); var args = new Windows.Kinect.CoordinateMappingChangedEventArgs(result); foreach (var func in callbackList) { #if UNITY_METRO || UNITY_XBOXONE UnityEngine.WSA.Application.InvokeOnAppThread(() => { try { func(objThis, args); } catch { } }, true); #else Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); #endif } } }
private static void Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) { if (!Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_callbacks.ContainsKey(pNative)) { Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_callbacks[pNative] = new List<RootSystem.EventHandler<Windows.Kinect.CoordinateMappingChangedEventArgs>>(); } var callbackList = Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_callbacks[pNative]; lock(callbackList) { try { var objThis = Helper.NativeObjectCache.GetObject<CoordinateMapper>(pNative); var args = new Windows.Kinect.CoordinateMappingChangedEventArgs(result); foreach(var func in callbackList) { if(func != null) { func(objThis, args); } } } catch { } } }