예제 #1
0
        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);
        }
예제 #2
0
 public static extern void MDataPermissionSetNewNative(IntPtr appPtr, IntPtr self, MDataPermissionSetNewCb callback);
예제 #3
0
 public void MDataPermissionSetNew(IntPtr appPtr, IntPtr self, MDataPermissionSetNewCb callback)
 {
     MDataPermissionSetNewNative(appPtr, self, callback);
 }