Example #1
0
 protected virtual async ValueTask DisposeAsync(bool disposing)
 {
     if (disposing)
     {
         await LockObject.DisposeAsync();
     }
 }
Example #2
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();
        }
Example #3
0
 /// <inheritdoc />
 public ValueTask DisposeAsync()
 {
     return(LockObject.DisposeAsync());
 }