示例#1
0
 public void Dispose()
 {
     if (!_ignore)
     {
         if (!_client.Lock())
         {
             throw new PascalCoinRPCException("Unable to lock wallet");
         }
     }
 }
 /// <summary>
 /// Locks the Wallet if it has a password, otherwise wallet cannot be locked
 /// </summary>
 /// <returns>Returns a Boolean indicating if Wallet is locked. If false that means that Wallet has an empty password and cannot be locked</returns>
 public static Task <bool> LockAsync(this IPascalCoinClient client)
 {
     return(Task.Run(() => client.Lock()));
 }