protected virtual async ValueTask DisposeAsync(bool disposing) { if (disposing) { await LockObject.DisposeAsync(); } }
/// <inheritdoc /> public async ValueTask DisposeAsync() { if (_blnIsDisposed) { return; } IAsyncDisposable objLocker = await LockObject.EnterWriteLockAsync().ConfigureAwait(false); try { _blnIsDisposed = true; _imgMugshot?.Dispose(); _tskRunningDownloadTask?.Dispose(); await _dicMyPluginData.DisposeAsync(); } finally { await objLocker.DisposeAsync().ConfigureAwait(false); } await LockObject.DisposeAsync(); }
/// <inheritdoc /> public ValueTask DisposeAsync() { return(LockObject.DisposeAsync()); }