WorkflowQueuingService Classe
Definição
Cuidado
The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*
Fornece os serviços para o gerenciamento de objetos WorkflowQueue.Provides the services for management of WorkflowQueue objects.
public ref class WorkflowQueuingService
public class WorkflowQueuingService
[System.Obsolete("The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*")]
public class WorkflowQueuingService
type WorkflowQueuingService = class
[<System.Obsolete("The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*")>]
type WorkflowQueuingService = class
Public Class WorkflowQueuingService
- Herança
-
WorkflowQueuingService
- Atributos
Exemplos
O exemplo de código a seguir demonstra um método, chamado CreateQueue , que inicializa um WorkflowQueuingService objeto chamando o ActivityExecutionContext.GetService método.The following code example demonstrates a method, named CreateQueue, that initializes a WorkflowQueuingService object by calling the ActivityExecutionContext.GetService method. Em seguida, o código usa o Exists método para determinar se um WorkflowQueue com um nome especificado existe.The code then uses the Exists method to determine if a WorkflowQueue with a specified name exists. Se não existir, o código chamará o CreateWorkflowQueue método; se o código chamar o GetWorkflowQueue método.If it does not exist, the code calls the CreateWorkflowQueue method; if it does the code calls the GetWorkflowQueue method.
Este exemplo de código faz parte do exemplo de SDK de atividade do observador de arquivo do arquivo FileSystemEvent. cs.This code example is part of the File Watcher Activity SDK Sample from the FileSystemEvent.cs file. Para obter mais informações, consulte atividade do observador do sistema de arquivos.For more information, see File System Watcher Activity.
private WorkflowQueue CreateQueue(ActivityExecutionContext context)
{
Console.WriteLine("CreateQueue");
WorkflowQueuingService qService = context.GetService<WorkflowQueuingService>();
if (!qService.Exists(this.QueueName))
{
qService.CreateWorkflowQueue(this.QueueName, true);
}
return qService.GetWorkflowQueue(this.QueueName);
}
Private Function CreateQueue(ByVal context As ActivityExecutionContext) As WorkflowQueue
Console.WriteLine("CreateQueue")
Dim qService As WorkflowQueuingService = context.GetService(Of WorkflowQueuingService)()
If Not qService.Exists(Me.queueName) Then
qService.CreateWorkflowQueue(Me.queueName, True)
End If
Return qService.GetWorkflowQueue(Me.QueueName)
End Function
Comentários
Observação
Este material discute tipos e namespaces obsoletos.This material discusses types and namespaces that are obsolete. Para obter mais informações, consulte Deprecated Types in Windows Workflow Foundation 4.5 (Tipos preteridos no Windows Workflow Foundation 4.5).For more information, see Deprecated Types in Windows Workflow Foundation 4.5.
WorkflowQueuingService fornece métodos que você pode usar para gerenciar as filas de fluxo de trabalho associadas a uma instância de fluxo de trabalho.WorkflowQueuingService provides methods that you can use to manage the workflow queues associated with a workflow instance.
Campos
| PendingMessagesProperty |
Contém os itens não consumidos nas filas de fluxo de trabalho associados a este WorkflowQueuingService.Contains the unconsumed items in the workflow queues associated with this WorkflowQueuingService. |
Métodos
| CreateWorkflowQueue(IComparable, Boolean) |
Cria uma WorkflowQueue usando o nome especificado e o escopo transacional.Creates a WorkflowQueue by using the specified name and transactional scope. |
| DeleteWorkflowQueue(IComparable) |
Exclui a WorkflowQueue especificada.Deletes the specified WorkflowQueue. |
| Equals(Object) |
Determina se o objeto especificado é igual ao objeto atual.Determines whether the specified object is equal to the current object. (Herdado de Object) |
| Exists(IComparable) |
Testa a existência da WorkflowQueue especificada.Tests for the existence of the specified WorkflowQueue. |
| GetHashCode() |
Serve como a função de hash padrão.Serves as the default hash function. (Herdado de Object) |
| GetType() |
Obtém o Type da instância atual.Gets the Type of the current instance. (Herdado de Object) |
| GetWorkflowQueue(IComparable) |
Recupera a WorkflowQueue especificada.Retrieves the specified WorkflowQueue. |
| MemberwiseClone() |
Cria uma cópia superficial do Object atual.Creates a shallow copy of the current Object. (Herdado de Object) |
| ToString() |
Retorna uma cadeia de caracteres que representa o objeto atual.Returns a string that represents the current object. (Herdado de Object) |