WorkflowRuntime.GetService Method (Type)
Retrieves a service of the specified Type from the workflow run-time engine.
Assembly: System.Workflow.Runtime (in System.Workflow.Runtime.dll)
GetService throws an InvalidOperationException if more than one service exists for the specified Type. Therefore, you should use one of the overloaded methods of GetAllServices if it is possible that multiple services of the specified type are present in the WorkflowRuntime. For example, the workflow run-time engine may have multiple tracking services. If you request a tracking service by specifying the TrackingService base class, it is possible that an exception will be thrown.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.