Exemplo n.º 1
0
        public static Task <ulong> AppPubSignKeyAsync()
        {
            var             tcs      = new TaskCompletionSource <ulong>();
            AppPubSignKeyCb callback = null;

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

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

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

            return(tcs.Task);
        }
Exemplo n.º 2
0
 public static extern void AppPubSignKeyNative(IntPtr appPtr, IntPtr self, AppPubSignKeyCb callback);
Exemplo n.º 3
0
 public void AppPubSignKey(IntPtr appPtr, IntPtr self, AppPubSignKeyCb callback)
 {
     AppPubSignKeyNative(appPtr, self, callback);
 }