O'Reilly logo

Microsoft® Windows® Workflow Foundation Step by Step by Kenn Scribner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building a Workflow Runtime Factory

I mentioned this previously in the chapter, but it is important enough to mention again—there can be only a single instance of WorkflowRuntime per AppDomain. And because the majority of .NET applications use only a single AppDomain, it necessarily follows that you can generally use only a single instance of WorkflowRuntime in your application.

Whenever I hear "use only a single instance," I naturally think of using a combination of the singleton and factory patterns. The singleton pattern, if you’re unfamiliar with patterns, is simply a mechanism for assuring that no matter how many times your application requests instances of the singleton object, only one instance of the singleton is ever given out. This is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required