WorkflowServiceHostFactory.CreateServiceHost(String, Uri[]) Método
Definição
Cria um WorkflowServiceHost de uma cadeia de caracteres que contém o nome do arquivo de marcação de fluxo de trabalho ou o nome do tipo do serviço de fluxo de trabalho e o endereço básico do serviço especificado.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.
public:
override System::ServiceModel::ServiceHostBase ^ CreateServiceHost(System::String ^ constructorString, cli::array <Uri ^> ^ baseAddresses);
public override System.ServiceModel.ServiceHostBase CreateServiceHost (string constructorString, Uri[] baseAddresses);
override this.CreateServiceHost : string * Uri[] -> System.ServiceModel.ServiceHostBase
Public Overrides Function CreateServiceHost (constructorString As String, baseAddresses As Uri()) As ServiceHostBase
Parâmetros
- constructorString
- String
O nome do arquivo de marcação de fluxo de trabalho que define o serviço de fluxo de trabalho ou o nome do tipo de serviço de fluxo de trabalho.The file name of the workflow markup file that defines the workflow service or the type name of the workflow service type.
- baseAddresses
- Uri[]
Uma matriz do tipo Uri que contém os endereços base do serviço hospedado.An array of type Uri that contains the base addresses for the hosted service.
Retornos
Um objeto ServiceHostBase associado ao serviço de fluxo de trabalho.A ServiceHostBase object associated with the workflow service. A implementação padrão retorna um objeto WorkflowServiceHost com os endereços básicos especificados.The default implementation returns a WorkflowServiceHost object with the specified base addresses.
Exemplos
Veja a seguir um exemplo de uma referência baseada em tipo para o serviço de fluxo de trabalho CalculatorServiceWorkflow.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" %>
Veja a seguir um exemplo de uma referência de arquivo de definição de fluxo de trabalho para o serviço de fluxo de trabalho 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" %>
Comentários
O constructorString argumento pode ser um nome de tipo de fluxo de trabalho totalmente qualificado ou pode ser o caminho de arquivo relativo do arquivo de definição de fluxo de trabalho declarado no arquivo. svc no qual as ServiceHostFactory diretivas são colocadas.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.
Observação
Para associar uma definição de regra a uma definição de fluxo de trabalho, nomeie o arquivo de definição de regra com o mesmo nome que o arquivo de definição de fluxo de trabalho com uma extensão. Rules e coloque-o no mesmo diretório que o arquivo de definição de fluxo de trabalho.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. Por exemplo, o arquivo de definição de regras CalculatorServiceWorkflow. Rules deve estar no mesmo diretório que CalculatorServiceWorkflow. xoml.For example, the rules definition file CalculatorServiceWorkflow.rules must be in the same directory as CalculatorServiceWorkflow.xoml.