Example #1
0
        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);
        }
Example #2
0
 public static extern void MDataListEntriesNative(IntPtr appPtr, ulong infoHandle, IntPtr self, MDataListEntriesCb callback);
Example #3
0
 public void MDataListEntries(IntPtr appPtr, ulong infoHandle, IntPtr self, MDataListEntriesCb callback)
 {
     MDataListEntriesNative(appPtr, infoHandle, self, callback);
 }