Created
March 4, 2014 19:49
-
-
Save khalidabuhakmeh/9354178 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public ActionResult Index() { | |
| return ProgressFlushResult(x => { | |
| x.PartialView("First"); | |
| x.PartialView("Second"); | |
| x.PartialView("Third"); | |
| }); | |
| } |
Author
You essentially want to create a "Workflow", which at the end of each state/node you want to flush. The yield return might be confusing to devs who might be familiar with that construct as it pertains to an "enumerable" thing.
I personally would prefer a more explicit implementation to something like this so it sticks out.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
But for my money,
yield returnis still the most elegant way to do this.