public static Task <ulong> MDataListEntriesAsync(ulong infoHandle) { var tcs = new TaskCompletionSource <ulong>(); MDataListEntriesCb callback = null; callback = (self, result, mDataEntriesHandle) => { if (result.ErrorCode != 0) { tcs.SetException(result.ToException()); CallbackManager.Unregister(callback); return; } tcs.SetResult(mDataEntriesHandle); CallbackManager.Unregister(callback); }; CallbackManager.Register(callback); NativeBindings.MDataListEntries(Session.AppPtr, infoHandle, Session.UserData, callback); return(tcs.Task); }
public static extern void MDataListEntriesNative(IntPtr appPtr, ulong infoHandle, IntPtr self, MDataListEntriesCb callback);
public void MDataListEntries(IntPtr appPtr, ulong infoHandle, IntPtr self, MDataListEntriesCb callback) { MDataListEntriesNative(appPtr, infoHandle, self, callback); }