コード例 #1
0
        public static Task <ulong> IDataNewSelfEncryptorAsync()
        {
            var tcs = new TaskCompletionSource <ulong>();
            IDataNewSelfEncryptorCb callback = null;

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

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

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

            return(tcs.Task);
        }
コード例 #2
0
 public static extern void IDataNewSelfEncryptorNative(IntPtr appPtr, IntPtr self, IDataNewSelfEncryptorCb callback);
コード例 #3
0
 public void IDataNewSelfEncryptor(IntPtr appPtr, IntPtr self, IDataNewSelfEncryptorCb callback)
 {
     IDataNewSelfEncryptorNative(appPtr, self, callback);
 }