protected virtual void Dispose(bool disposing) { if (disposing) { DisposableTracker.RemoveObject(this); } }
protected void Close() { if (!Closed) { Stream.Close(); DisposableTracker.RemoveObject(this); Closed = true; } }
public Task CloseAsync() { if (!Closed) { Stream.Close(); DisposableTracker.RemoveObject(this); Closed = true; } return(Task.CompletedTask); }
protected virtual void Dispose(bool disposing) { if (disposing) { DisposableTracker.RemoveObject(this); YetaWFManager.Syncify(async() => // Only used if caller forgets to Unlock await UnlockAsync() ); } }