public static extern void MDataPutNative( IntPtr appPtr, ulong infoHandle, ulong permissionsHandle, ulong entriesHandle, IntPtr self, MDataPutCb callback);
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); }
public void MDataPut(IntPtr appPtr, ulong infoHandle, ulong permissionsHandle, ulong entriesHandle, IntPtr self, MDataPutCb callback) { MDataPutNative(appPtr, infoHandle, permissionsHandle, entriesHandle, self, callback); }