Share via


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.

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 . Em seguida, o código usa o Exists método para determinar se existe um WorkflowQueue com um nome especificado. Se ele não existir, o código chamará o CreateWorkflowQueue método; se ele fizer isso, o código chamará o GetWorkflowQueue método .

Este exemplo de código faz parte do Exemplo de SDK de Atividade do Observador de Arquivos do arquivo FileSystemEvent.cs. Para obter mais informações, consulte Atividade do Observador do Sistema de Arquivos.

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. Para obter mais informações, consulte Deprecated Types in Windows Workflow Foundation 4.5 (Tipos preteridos no 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.

Campos

PendingMessagesProperty
Obsoleto.

Contém os itens não consumidos nas filas de fluxo de trabalho associados a este WorkflowQueuingService.

Métodos

CreateWorkflowQueue(IComparable, Boolean)
Obsoleto.

Cria uma WorkflowQueue usando o nome especificado e o escopo transacional.

DeleteWorkflowQueue(IComparable)
Obsoleto.

Exclui a WorkflowQueue especificada.

Equals(Object)
Obsoleto.

Determina se o objeto especificado é igual ao objeto atual.

(Herdado de Object)
Exists(IComparable)
Obsoleto.

Testa a existência da WorkflowQueue especificada.

GetHashCode()
Obsoleto.

Serve como a função de hash padrão.

(Herdado de Object)
GetType()
Obsoleto.

Obtém o Type da instância atual.

(Herdado de Object)
GetWorkflowQueue(IComparable)
Obsoleto.

Recupera a WorkflowQueue especificada.

MemberwiseClone()
Obsoleto.

Cria uma cópia superficial do Object atual.

(Herdado de Object)
ToString()
Obsoleto.

Retorna uma cadeia de caracteres que representa o objeto atual.

(Herdado de Object)

Aplica-se a

Confira também