public bool TryGet(OutPoint utxo, [NotNullWhen(returnValue: true)] out Inmate?inmate) { lock (Lock) { return(Inmates.TryGetValue(utxo, out inmate)); } }
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); } } }