示例#1
0
        /// <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();
        }