Пример #1
0
        public static Task <ulong> MDataInfoRandomPrivateAsync(ulong typeTag)
        {
            var tcs = new TaskCompletionSource <ulong>();

            MDataInfoRandomPrivateCb callback = null;

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

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

            CallbackManager.Register(callback);
            NativeBindings.MDataInfoRandomPrivate(Session.AppPtr, typeTag, Session.UserData, callback);

            return(tcs.Task);
        }
Пример #2
0
 public static extern void MDataInfoRandomPrivateNative(IntPtr appPtr, ulong typeTag, IntPtr self, MDataInfoRandomPrivateCb callback);
Пример #3
0
 public void MDataInfoRandomPrivate(IntPtr appPtr, ulong typeTag, IntPtr self, MDataInfoRandomPrivateCb callback)
 {
     MDataInfoRandomPrivateNative(appPtr, typeTag, self, callback);
 }