CorrelationHandle Classe

Definição

Associa as atividades em uma correlação representando uma InstanceKey compartilhada específica ou um contexto transitório no fluxo de trabalho.Associates activities together in a correlation by representing a particular shared InstanceKey or transient context in the workflow.

public ref class CorrelationHandle : System::Activities::Handle
[System.Runtime.Serialization.DataContract]
public class CorrelationHandle : System.Activities.Handle
[<System.Runtime.Serialization.DataContract>]
type CorrelationHandle = class
    inherit Handle
Public Class CorrelationHandle
Inherits Handle
Herança
CorrelationHandle
Atributos

Exemplos

O exemplo a seguir mostra como definir o CorrelationHandle em uma SendReply atividade.The following example shows how to set the CorrelationHandle on a SendReply activity.

new SendReply
{
    DisplayName = "Send Adjusted Cost",
    Request = prescriptionRequest,
    // Initialize the orderHandle using the MessageQuerySet to correlate with the final GetAdjustedCost request
    CorrelationInitializers = 
    {
        new QueryCorrelationInitializer
        {
            CorrelationHandle = orderHandle,
            MessageQuerySet = GetOrderQuerySet
        }
    },
    Content = SendContent.Create(new InArgument<Order>((e) => order.Get(e)))
}

Comentários

Windows Workflow Foundation (WF) fornece quatro tipos de correlação: baseada em conteúdo, solicitação-resposta, duplex durávele troca de contexto.Windows Workflow Foundation (WF) provides four types of correlation: Content Based, Request-Reply, Durable Duplex, and Context Exchange. Para obter mais informações sobre correlação, consulte visão geral da correlação, os tipos de correlação específicos mencionados anteriormente e os exemplos de correlação localizados nos Serviços [WF Samples] nó dos exemplos do WF.For more information about correlation, see Correlation Overview, the specific correlation types mentioned previously, and the correlation samples located in the Services [WF Samples] node of the WF samples.

O tempo de execução usa o CorrelationHandle para correlação, se estiver presente, caso contrário, a propriedade CorrelatesWith da atividade de mensagens será usada.The runtime uses the CorrelationHandle for correlation if it is present, otherwise the CorrelatesWith property of the messaging activity will be used. Se ambos estiverem ausentes, o identificador de ambiente fornecido pelo CorrelationScope ou pelo serviço de fluxo de trabalho será usado.If both are absent, the ambient handle provided by CorrelationScope or the workflow service is used.

Construtores

CorrelationHandle()

Inicializa uma nova instância da classe CorrelationHandle.Initializes a new instance of the CorrelationHandle class.

Propriedades

ExecutionPropertyName

Obtém o nome a ser usado por este Handle quando adicionado às propriedades de execução de uma atividade.Gets the name to be used by this Handle when added to an activity's execution properties.

(Herdado de Handle)
Owner

Obtém a ActivityInstance que contém a Variable que contém o Handle.Gets the ActivityInstance that contains the Variable that contains the Handle.

(Herdado de Handle)

Métodos

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)
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)
MemberwiseClone()

Cria uma cópia superficial do Object atual.Creates a shallow copy of the current Object.

(Herdado de Object)
OnInitialize(HandleInitializationContext)

Registra o CorrelationHandle no runtime de fluxo de trabalho.Registers the CorrelationHandle with the workflow runtime.

OnUninitialize(HandleInitializationContext)

Cancela o registro do CorrelationHandle no runtime de fluxo de trabalho.Unregisters the CorrelationHandle with the workflow runtime.

ThrowIfUninitialized()

Gera uma InvalidOperationException quando o Handle não é inicializado.Throws an InvalidOperationException if the Handle has not been initialized.

(Herdado de Handle)
ToString()

Retorna uma cadeia de caracteres que representa o objeto atual.Returns a string that represents the current object.

(Herdado de Object)

Aplica-se a