Пример #1
0
 public static extern void MDataPutNative(
     IntPtr appPtr,
     ulong infoHandle,
     ulong permissionsHandle,
     ulong entriesHandle,
     IntPtr self,
     MDataPutCb callback);
Пример #2
0
        public static Task MDataPutAsync(ulong mDataInfoH, ulong permissionsH, ulong entriesH)
        {
            var        tcs      = new TaskCompletionSource <object>();
            MDataPutCb callback = null;

            callback = (pVoid, result) => {
                if (result.ErrorCode != 0)
                {
                    tcs.SetException(result.ToException());
                    CallbackManager.Unregister(callback);
                    return;
                }

                tcs.SetResult(null);
                CallbackManager.Unregister(callback);
            };

            CallbackManager.Register(callback);
            NativeBindings.MDataPut(Session.AppPtr, mDataInfoH, permissionsH, entriesH, Session.UserData, callback);

            return(tcs.Task);
        }
Пример #3
0
 public void MDataPut(IntPtr appPtr, ulong infoHandle, ulong permissionsHandle, ulong entriesHandle, IntPtr self, MDataPutCb callback)
 {
     MDataPutNative(appPtr, infoHandle, permissionsHandle, entriesHandle, self, callback);
 }