public static Task <ulong> MDataPermissionSetNewAsync() { var tcs = new TaskCompletionSource <ulong>(); MDataPermissionSetNewCb callback = null; callback = (pVoid, result, permissionSetH) => { if (result.ErrorCode != 0) { tcs.SetException(result.ToException()); CallbackManager.Unregister(callback); return; } tcs.SetResult(permissionSetH); CallbackManager.Unregister(callback); }; CallbackManager.Register(callback); NativeBindings.MDataPermissionSetNew(Session.AppPtr, Session.UserData, callback); return(tcs.Task); }
public static extern void MDataPermissionSetNewNative(IntPtr appPtr, IntPtr self, MDataPermissionSetNewCb callback);
public void MDataPermissionSetNew(IntPtr appPtr, IntPtr self, MDataPermissionSetNewCb callback) { MDataPermissionSetNewNative(appPtr, self, callback); }