© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
106 replies
stigzler

❔ ✅ Baffled by Async-Await and Task

I'm trying to create a non-UI blocking Unzipper helper class that reports progress. I've tried to take on async/await + tasks so many times, but always come a cropper. I can manage Async/await with .net async methods (e.g. webClient.DownloadFileAsync, but the problem comes with sychronous key methods. Anyways, here's the helper class:

https://paste.mod.gg/xklfwuocvtgm/0

and it's called, thus:

 string targetDir = "C:\\temp\\project tests\\Updater\\NetUpdate\\App";
Unzipper unzipper = new Unzipper(new FileInfo(tempPayloadFile), new DirectoryInfo(targetDir));
unzipper.NewEntryExtractionStarted += Unzip_NewEntryExtractionStarted;
unzipper.EntryExtractionProgressed += Unzip_EntryExtractionProgressed;
unzipper.Unzip();
 string targetDir = "C:\\temp\\project tests\\Updater\\NetUpdate\\App";
Unzipper unzipper = new Unzipper(new FileInfo(tempPayloadFile), new DirectoryInfo(targetDir));
unzipper.NewEntryExtractionStarted += Unzip_NewEntryExtractionStarted;
unzipper.EntryExtractionProgressed += Unzip_EntryExtractionProgressed;
unzipper.Unzip();


I've done no end of reading - just conceptually this is illuding me. What am I missing - based on this code?
BlazeBin - xklfwuocvtgm
A tool for sharing your source code with the world!
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements
Next page

Similar Threads

✅ async/await Task in an AWS Lambda
C#CC# / help
3y ago
✅ async/await and parallelism
C#CC# / help
13mo ago
async/await and mutexes
C#CC# / help
2y ago
Learning Streamreader and async / await
C#CC# / help
4mo ago