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);
 }
예제 #4
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         DisposableTracker.RemoveObject(this);
         YetaWFManager.Syncify(async() =>  // Only used if caller forgets to Unlock
                               await UnlockAsync()
                               );
     }
 }