WorkflowQueuingService Clase

Definición

Precaución

The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*

Proporciona los servicios para la gestión de los 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
Herencia
WorkflowQueuingService
Atributos

Ejemplos

El ejemplo de código siguiente muestra un método, denominado CreateQueue, que inicializa un objeto WorkflowQueuingService llamando al método ActivityExecutionContext.GetService. A continuación, el código utiliza el método Exists para determinar si existe un WorkflowQueue con un nombre específico. Si no existe, el código llama al método CreateWorkflowQueue; si sí que existe, el código llama al método GetWorkflowQueue.

Este ejemplo de código forma parte de la muestra de SDK de actividad de observador de archivo del archivo FileSystemEvent.cs. Para obtener más información, vea Actividad del monitor del sistema de archivos.

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

Comentarios

Nota

En esta documentación se describen los tipos y espacios de nombres que están obsoletos. Para obtener más información, vea Tipos en desuso en Windows Workflow Foundation 4.5.

WorkflowQueuingService proporciona los métodos que puede utilizar para gestionar las colas del flujo de trabajo asociadas a una instancia de flujo de trabajo.

Campos

PendingMessagesProperty
Obsoletos.

Contiene los elementos no consumidos en las colas del flujo de trabajo asociadas a WorkflowQueuingService.

Métodos

CreateWorkflowQueue(IComparable, Boolean)
Obsoletos.

Crea WorkflowQueue mediante el nombre especificado y el ámbito transaccional.

DeleteWorkflowQueue(IComparable)
Obsoletos.

Elimina el WorkflowQueue especificado.

Equals(Object)
Obsoletos.

Determina si el objeto especificado es igual que el objeto actual.

(Heredado de Object)
Exists(IComparable)
Obsoletos.

Prueba la existencia de la WorkflowQueue especificada.

GetHashCode()
Obsoletos.

Sirve como la función hash predeterminada.

(Heredado de Object)
GetType()
Obsoletos.

Obtiene el Type de la instancia actual.

(Heredado de Object)
GetWorkflowQueue(IComparable)
Obsoletos.

Recupera el WorkflowQueue especificado.

MemberwiseClone()
Obsoletos.

Crea una copia superficial del Object actual.

(Heredado de Object)
ToString()
Obsoletos.

Devuelve una cadena que representa el objeto actual.

(Heredado de Object)

Se aplica a

Consulte también