This recipe talks about the details of synchronization context behavior when await
is used to get asynchronous operation results. We will learn how and when to turn off the synchronization context flow.
To step through this recipe, you will need Visual Studio 2012. There are no other prerequisites. The source code for this recipe can be found at BookSamples\Chapter5\Recipe6
.
To understand details of synchronization context behavior when await
is used and to learn how and when to turn off the synchronization context flow, perform the following steps:
Start Visual Studio 2012. Create a new C# Console Application project.
Add references to Windows Presentation Foundation Library.
Right-click on the References folder in the project, and select the Add reference… menu option.
Add references to the following libraries: PresentationCore, PresentationFramework, System.Xaml, and Windows.Base. You can use the search function in...