protected virtual async ValueTask DisposeAsyncCore() { if (InactiveReservesStream is not null) { await InactiveReservesStream.DisposeAsync(); } if (TrainingStream is not null) { await TrainingStream.DisposeAsync(); } }
protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { InactiveReservesStream?.Dispose(); TrainingStream?.Dispose(); } InactiveReservesStream = null; TrainingStream = null; disposedValue = true; } }