Esempio n. 1
0
        public async ValueTask DisposeAsync()
        {
            // First delete the temporary folder content
            await IOUtilities.DeleteAsync(new DirectoryInfo(FullPath), CancellationToken.None).ConfigureAwait(false);

            // Release the lock file and delete the parent directory
#if NET5_0 || NETCOREAPP3_1
            await _lockFile.DisposeAsync().ConfigureAwait(false);
#elif NETSTANDARD2_0
            _lockFile.Dispose();
#else
#error Platform not supported
#endif
            await IOUtilities.DeleteAsync(new DirectoryInfo(_path), CancellationToken.None).ConfigureAwait(false);
        }
 public ValueTask DisposeAsync()
 {
     return(IOUtilities.DeleteAsync(new DirectoryInfo(FullPath)));
 }
Esempio n. 3
0
 public ValueTask DisposeAsync()
 {
     return(IOUtilities.DeleteAsync(new DirectoryInfo(FullPath), CancellationToken.None));
 }