Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Quality: Convert into await using statement or declaration #16694

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andreistaravoitau
Copy link

Resolved / Related Issues

Steps used to test these changes

  1. Opened Files with the updated code.
  2. Verified that resources are disposed of asynchronously without blocking the UI.
  3. Tested all affected scenarios for stability, including:
  • Opening and closing files
  • Performing file operations (e.g., move, copy, delete)
  • Handling zip files.

@yaira2 yaira2 changed the title Convert into await using statement or declaration Code Quality: Convert into await using statement or declaration Jan 9, 2025
@yaira2 yaira2 requested a review from gave92 January 13, 2025 23:29
{
SevenZipCompressor compressor = new SevenZipCompressor() { CompressionMode = CompressionMode.Append };
compressor.SetFormatFromExistingArchive(archiveStream);
var fileName = IO.Path.GetRelativePath(containerPath, zipDesiredName);
await compressor.CompressStreamDictionaryAsync(archiveStream, new Dictionary<string, Stream>() { { fileName, contents } }, Credentials.Password, ms);
}
using (var archiveStream = await OpenZipFileAsync(FileAccessMode.ReadWrite))

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the newline changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code Quality: Convert into await using statement or declaration
3 participants