Пример #1
0
 public bool TryGet(OutPoint utxo, [NotNullWhen(returnValue: true)] out Inmate?inmate)
 {
     lock (Lock)
     {
         return(Inmates.TryGetValue(utxo, out inmate));
     }
 }
Пример #2
0
 public bool TryRelease(OutPoint utxo, [NotNullWhen(returnValue: true)] out Inmate?inmate)
 {
     lock (Lock)
     {
         if (Inmates.TryGetValue(utxo, out inmate))
         {
             Inmates.Remove(utxo);
             ChangeId = Guid.NewGuid();
             return(true);
         }
         else
         {
             return(false);
         }
     }
 }