The Delay activity in Workflow Foundation can be used in many scenarios, but the most likely use is in a composite operation, where you want the execution to wait for a response and cast a failure if the response isn’t received in proper time.
The Delay activity has just one parameter, which is call Duration. It expects a Timespan variable or expression. If you want the same duration in every place it would be wise to create a variable to hold the value and use it at the right spots or a better option would be to create a custom activity:
- Add a new file
- Add the delay activity
- Set the Duration on the delay activity
- Rebuild the project
- Add the custom activity to your workflow
In Visual Basic Workflow projects this is how you configure it in the expression:
In Visual C# Workflow project there is a difference based on the edition of Visual Studio you are using. If it is .Net Framework 4 then you have to use Visual Basic syntax and if it is .Net Framework 4.5 you can use C# language in the expression:
Random posts:
- Update to lens and camera database
- Nikon normal lenses
- Canon wide zoom lenses
- Simple autogenerated facade WCF service with T4
- Superliga runde 14
- Welcome to app construction
- Welcome to Office Power blog
Help me, help you. You know how 😉 (click, click, click…) Or buy anything at Amazon. You get the same price, and I get a little bit of money. Follow the Photospots site on Facebook