diff --git a/AsyncPushStreamContentExample/AsyncPushStreamContentExample.sln b/Example/Example.sln similarity index 100% rename from AsyncPushStreamContentExample/AsyncPushStreamContentExample.sln rename to Example/Example.sln diff --git a/AsyncPushStreamContentExample/WebApplication/App_Start/WebApiConfig.cs b/Example/WebApplication/App_Start/WebApiConfig.cs similarity index 100% rename from AsyncPushStreamContentExample/WebApplication/App_Start/WebApiConfig.cs rename to Example/WebApplication/App_Start/WebApiConfig.cs diff --git a/AsyncPushStreamContentExample/WebApplication/Controllers/FileController.cs b/Example/WebApplication/Controllers/FileController.cs similarity index 92% rename from AsyncPushStreamContentExample/WebApplication/Controllers/FileController.cs rename to Example/WebApplication/Controllers/FileController.cs index b2fde28..37dfe32 100644 --- a/AsyncPushStreamContentExample/WebApplication/Controllers/FileController.cs +++ b/Example/WebApplication/Controllers/FileController.cs @@ -19,8 +19,8 @@ public HttpResponseMessage Get() { var filenamesAndUrls = new Dictionary { - { "README.md", "https://raw.githubusercontent.com/StephenClearyExamples/AsyncPushStreamContent/master/README.md" }, - { ".gitignore", "https://raw.githubusercontent.com/StephenClearyExamples/AsyncPushStreamContent/master/.gitignore" }, + { "README.md", "https://raw.githubusercontent.com/StephenClearyExamples/AsyncDynamicZip/master/README.md" }, + { ".gitignore", "https://raw.githubusercontent.com/StephenClearyExamples/AsyncDynamicZip/master/.gitignore" }, }; var result = new HttpResponseMessage(HttpStatusCode.OK) diff --git a/AsyncPushStreamContentExample/WebApplication/Global.asax b/Example/WebApplication/Global.asax similarity index 100% rename from AsyncPushStreamContentExample/WebApplication/Global.asax rename to Example/WebApplication/Global.asax diff --git a/AsyncPushStreamContentExample/WebApplication/Global.asax.cs b/Example/WebApplication/Global.asax.cs similarity index 100% rename from AsyncPushStreamContentExample/WebApplication/Global.asax.cs rename to Example/WebApplication/Global.asax.cs diff --git a/AsyncPushStreamContentExample/WebApplication/Web.Debug.config b/Example/WebApplication/Web.Debug.config similarity index 100% rename from AsyncPushStreamContentExample/WebApplication/Web.Debug.config rename to Example/WebApplication/Web.Debug.config diff --git a/AsyncPushStreamContentExample/WebApplication/Web.Release.config b/Example/WebApplication/Web.Release.config similarity index 100% rename from AsyncPushStreamContentExample/WebApplication/Web.Release.config rename to Example/WebApplication/Web.Release.config diff --git a/AsyncPushStreamContentExample/WebApplication/Web.config b/Example/WebApplication/Web.config similarity index 100% rename from AsyncPushStreamContentExample/WebApplication/Web.config rename to Example/WebApplication/Web.config diff --git a/AsyncPushStreamContentExample/WebApplication/WebApplication.csproj b/Example/WebApplication/WebApplication.csproj similarity index 100% rename from AsyncPushStreamContentExample/WebApplication/WebApplication.csproj rename to Example/WebApplication/WebApplication.csproj diff --git a/AsyncPushStreamContentExample/WebApplication/packages.config b/Example/WebApplication/packages.config similarity index 100% rename from AsyncPushStreamContentExample/WebApplication/packages.config rename to Example/WebApplication/packages.config diff --git a/README.md b/README.md index 52266a5..4e7a273 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,9 @@ -# AsyncPushStreamContent -Example of asynchronous usage of `PushStreamContent`. +# Async Zip-on-the-Fly + +Example of dynamically generating a zip file download from ASP.NET WebAPI, with minimal threading and memory usage. + +Specifically, with this code: +- No file is ever completely in memory at any time. As files are read, they are immediately compressed and sent to the browser. +- No threads are ever blocked waiting on reads or writes. The fully-asynchronous code permits threads to return to the thread pool unless they are actually executing code. + +This example uses `PushStreamContent` (with an asynchronous delegate), and uses `DotNetZip` to create the zip stream. \ No newline at end of file