Send Classe

Definição

Uma atividade que envia uma mensagem a um serviço.An activity that sends a message to a service.

public ref class Send sealed : System::Activities::Activity
[System.Windows.Markup.ContentProperty("Content")]
public sealed class Send : System.Activities.Activity
[<System.Windows.Markup.ContentProperty("Content")>]
type Send = class
    inherit Activity
Public NotInheritable Class Send
Inherits Activity
Herança
Atributos

Exemplos

O exemplo a seguir mostra como criar uma Send atividade e adicioná-la a um fluxo de trabalho.The following example shows how to create a Send activity and add it to a workflow. O exemplo também mostra como usar a ReceiveReply atividade para receber a mensagem de resposta.The example also shows how to use ReceiveReply activity to receive the reply message.

Variable<string> message = new Variable<string>("message", "client");
Variable<string> result = new Variable<string> { Name = "result" };

Endpoint endpoint = new Endpoint
{
    AddressUri = new Uri(Common.Constants.ServiceBaseAddress),
    Binding = new BasicHttpBinding(),
};

Send requestEcho = new Send
{
    ServiceContractName = XName.Get("Echo", "http://tempuri.org/"),
    Endpoint = endpoint,
    OperationName = "Echo",
    Content = new SendParametersContent
    {
        Parameters =
            {
                { "message", new InArgument<string>(message) }
            }
    }
};
workflow = new CorrelationScope
{
    Body = new Sequence
    {
        Variables = { message, result },
        Activities =
        {
            new WriteLine {
                Text = new InArgument<string>("Hello")
            },
            requestEcho,
            new ReceiveReply
            {
                Request = requestEcho,
                Content = new ReceiveParametersContent
                {
                    Parameters =
                    {
                        { "echo", new OutArgument<string>(result) }
                    }
                }
            },
            new WriteLine {
                Text = new InArgument<string>(result)
            }
        }
    }
};

Construtores

Send()

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

Propriedades

Action

Obtém ou define o valor do cabeçalho de ação da mensagem sendo enviada.Gets or sets the value of the action header of the message being sent.

CacheId

Obtém um identificador do cache que é exclusivo no escopo da definição do fluxo de trabalho.Gets the identifier of the cache that is unique within the scope of the workflow definition.

(Herdado de Activity)
Constraints

Obtém uma coleção de atividades de Constraint que podem ser configuradas para fornecer validação para a Activity.Gets a collection of Constraint activities that can be configured to provide validation for the Activity.

(Herdado de Activity)
Content

Obtém ou define o conteúdo enviado pela atividade Send.Gets or sets the content sent by the Send activity.

CorrelatesWith

Obtém ou define um identificador de correlação que é usado para rotear a mensagem à instância de fluxo de trabalho apropriada.Gets or sets a correlation handle that is used to route the message to the appropriate workflow instance.

CorrelationInitializers

Obtém uma coleção de inicializadores de correlação.Gets a collection of correlation initializers.

DisplayName

Obtém ou define um nome amigável opcional que é usado para depuração, validação, manipulação de exceções e acompanhamento.Gets or sets an optional friendly name that is used for debugging, validation, exception handling, and tracking.

(Herdado de Activity)
Endpoint

Obtém ou define o ponto de extremidade para o qual enviar mensagens.Gets or sets the endpoint to send messages to.

EndpointAddress

Obtém ou define o endereço do ponto de extremidade para o qual enviar mensagens.Gets or sets the address of the endpoint to send messages to.

EndpointConfigurationName

Obtém ou define o nome da configuração do ponto de extremidade.Gets or sets the name of the endpoint configuration.

Id

Obtém um identificador que é exclusivo no escopo da definição do fluxo de trabalho.Gets an identifier that is unique in the scope of the workflow definition.

(Herdado de Activity)
Implementation

Obtém ou define o delegado que retorna um Activity que contém a lógica de execução.Gets or sets the delegate that returns an Activity that contains the execution logic.

(Herdado de Activity)
ImplementationVersion

Obtém ou define a versão de implementação usada.Gets or sets the version of the implementation used.

(Herdado de Activity)
KnownTypes

Obtém uma coleção dos tipos conhecidos para a operação de serviço a ser chamada.Gets a collection of the known types for the service operation to be called.

OperationName

Obtém ou define o nome da operação de serviço a ser chamada.Gets or sets the name of the service operation to be called.

ProtectionLevel

Obtém ou define um valor que indica o nível de proteção para a mensagem.Gets or sets a value that indicates the protection level for the message.

SerializerOption

Obtém ou define um valor que indica o serializador a ser usado ao enviar uma mensagem.Gets or sets a value that specifies the serializer to use when sending a message.

ServiceContractName

O nome do contrato implementado pelo serviço a ser chamado.The name of the contract the service to be called implements.

TokenImpersonationLevel

Obtém ou define um valor que indica o nível de representação de token permitido para o receptor da mensagem.Gets or sets a value that indicates the token impersonation level allowed for the receiver of the message.

Métodos

CacheMetadata(ActivityMetadata)

Cria e valida uma descrição dos argumentos, das variáveis, das atividades filho e dos representantes da atividade.Creates and validates a description of the activity's arguments, variables, child activities, and activity delegates.

(Herdado de Activity)
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)
OnCreateDynamicUpdateMap(UpdateMapMetadata, Activity)

Gera um evento ao criar o mapa de atualização dinâmica.Raises an event when creating dynamic update map.

(Herdado de Activity)
ShouldSerializeDisplayName()

Indica se a propriedade DisplayName deve ser serializada.Indicates whether the DisplayName property should be serialized.

(Herdado de Activity)
ToString()

Retorna um String que contém o Id e DisplayName do Activity.Returns a String that contains the Id and DisplayName of the Activity.

(Herdado de Activity)

Aplica-se a