public void Deallocate() { if (_folderLease == null) return; var lease = _folderLease; _folderLease = null; lease.Release(); LeasedOut = false; }
public async Task<ILease> Lease(IAllocator allocator, Specification spec) { LeasedOut = true; _folderLease = new FolderLease(this, Directory); return _folderLease; }