WorkflowServiceHostFactory::CreateServiceHost Method (String^, array<Uri^>^)
Creates a WorkflowServiceHost from a string that contains either the file name of the workflow markup file or the type name of the workflow service type and the base address of the service specified.
Assembly: System.WorkflowServices (in System.WorkflowServices.dll)
public: virtual ServiceHostBase^ CreateServiceHost( String^ constructorString, array<Uri^>^ baseAddresses ) override
Parameters
- constructorString
-
Type:
System::String^
The file name of the workflow markup file that defines the workflow service or the type name of the workflow service type.
- baseAddresses
-
Type:
array<System::Uri^>^
An array of type Uri that contains the base addresses for the hosted service.
Return Value
Type: System.ServiceModel::ServiceHostBase^A ServiceHostBase object associated with the workflow service. The default implementation returns a WorkflowServiceHost object with the specified base addresses.
The constructorString argument could be either a fully qualified workflow type name or it could be the relative file path of the workflow definition file declared in the .svc file in which ServiceHostFactory directives are placed.
Note |
|---|
To associate a rule definition with a workflow definition, name the rule definition file the same name as the workflow definition file with a .rules extension and place it in same directory as the workflow definition file. For example, the rules definition file CalculatorServiceWorkflow.rules must be in the same directory as CalculatorServiceWorkflow.xoml. |
The following is an example of a type-based reference to the workflow service CalculatorServiceWorkflow.
<%@ServiceHost language=c# Debug="true" Factory="System.ServiceModel.Activation.WorkflowServiceHostFactory" Service="CalculatorServiceWorkflow" %>
The following is an example of a workflow definition file reference to the workflow service CalculatorServiceWorkflow.
<%@ServiceHost language=c# Debug="true" Factory="System.ServiceModel.Activation.WorkflowServiceHostFactory" Service="CalculatorServiceWorkflow.xoml" %>
Available since 3.5
