CorrelationAliasAttribute Classe

Definição

Cuidado

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

Substitui o valor de parâmetro de correlação quando o valor de correlação deve ser obtido de um parâmetro que não seja o indicado pelo CorrelationParameterAttribute.Overrides the correlation parameter value when the correlation value must be obtained from a parameter other than that indicated by the CorrelationParameterAttribute. Essa classe não pode ser herdada.This class cannot be inherited.

public ref class CorrelationAliasAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Delegate | System.AttributeTargets.Event | System.AttributeTargets.Method, AllowMultiple=true)]
public sealed class CorrelationAliasAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Delegate | System.AttributeTargets.Event | System.AttributeTargets.Method, AllowMultiple=true)]
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public sealed class CorrelationAliasAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Delegate | System.AttributeTargets.Event | System.AttributeTargets.Method, AllowMultiple=true)>]
type CorrelationAliasAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Delegate | System.AttributeTargets.Event | System.AttributeTargets.Method, AllowMultiple=true)>]
[<System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")>]
type CorrelationAliasAttribute = class
    inherit Attribute
Public NotInheritable Class CorrelationAliasAttribute
Inherits Attribute
Herança
CorrelationAliasAttribute
Atributos

Exemplos

O exemplo de código a seguir mostra como usar um CorrelationAliasAttribute para substituir um CorrelationParameterAttribute .The following code example shows how to use a CorrelationAliasAttribute to override a CorrelationParameterAttribute. Este exemplo de código é do exemplo do SDK do CorrelatedLocalService.This code example is from the CorrelatedLocalService SDK sample. Para obter mais informações, consulte exemplo de serviço local correlacionado.For more information, see Correlated Local Service Sample.

[ExternalDataExchange]
[CorrelationParameter("taskId")]
public interface ITaskService2
{
    [CorrelationInitializer]
    void CreateTask(string taskId, string assignee, string text);

    [CorrelationAlias("taskId", "e.Id")]
    event EventHandler<TaskEventArgs> TaskCompleted;
}

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.

Para corresponder uma mensagem de entrada com a instância de fluxo de trabalho apropriada, a mensagem e a instância de fluxo de trabalho devem compartilhar uma chave.To match an incoming message with the appropriate workflow instance, the message and the workflow instance must share a key. Essa chave é chamada de um conjunto de correlação.This key is called a correlation set. Normalmente, a chave pode ser um conjunto de correlação de valor único.Typically, the key can be a single-valued correlation set. Isso significa que um campo de ID na mensagem pode ser correspondido em relação a uma ID do mesmo tipo que é mantido por instâncias de agendamento.This means that an ID field in the message can be matched against an ID of the same type that is held by schedule instances.

O CorrelationAliasAttribute é aplicado a um método ou a um evento em uma interface em uma interface de troca de dados.The CorrelationAliasAttribute is applied to a method or an event on an interface on a data exchange interface.

Construtores

CorrelationAliasAttribute(String, String)

Inicializa uma nova instância do CorrelationAliasAttribute com o nome da correlação para o qual está sendo criado um alias e o caminho para o local em que o valor pode ser encontrado.Initializes a new instance of the CorrelationAliasAttribute with the name of the correlation that is being aliased and the path to where the value can be found.

Propriedades

Name

Obtém o nome do parâmetro de correlação para o qual está sendo criado um alias.Gets the name of the correlation parameter that is being aliased.

Path

Obtém o caminho no parâmetro que especifica o local do valor de correlação.Gets the path within the parameter that specifies the location of the correlation value.

TypeId

Quando implementado em uma classe derivada, obtém um identificador exclusivo para este Attribute.When implemented in a derived class, gets a unique identifier for this Attribute.

(Herdado de Attribute)

Métodos

Equals(Object)

Retorna um valor que indica se essa instância é igual a um objeto especificado.Returns a value that indicates whether this instance is equal to a specified object.

(Herdado de Attribute)
GetHashCode()

Retorna o código hash para a instância.Returns the hash code for this instance.

(Herdado de Attribute)
GetType()

Obtém o Type da instância atual.Gets the Type of the current instance.

(Herdado de Object)
IsDefaultAttribute()

Quando substituído em uma classe derivada, indica se o valor dessa instância é o valor padrão para a classe derivada.When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.

(Herdado de Attribute)
Match(Object)

Quando substituído em uma classe derivada, retorna um valor que indica se essa instância é igual a um objeto especificado.When overridden in a derived class, returns a value that indicates whether this instance equals a specified object.

(Herdado de Attribute)
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)

Implantações explícitas de interface

_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

Mapeia um conjunto de nomes para um conjunto correspondente de identificadores de expedição.Maps a set of names to a corresponding set of dispatch identifiers.

(Herdado de Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

Recupera as informações de tipo para um objeto, que pode ser usado para obter as informações de tipo para uma interface.Retrieves the type information for an object, which can be used to get the type information for an interface.

(Herdado de Attribute)
_Attribute.GetTypeInfoCount(UInt32)

Retorna o número de interfaces de informações do tipo que um objeto fornece (0 ou 1).Retrieves the number of type information interfaces that an object provides (either 0 or 1).

(Herdado de Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

Fornece acesso a propriedades e métodos expostos por um objeto.Provides access to properties and methods exposed by an object.

(Herdado de Attribute)

Aplica-se a