Compartir a través de


TransactedReceiveScope.Request Propiedad

Definición

Obtiene o establece la actividad Receive asociada a esta actividad TransactedReceiveScope.

public:
 property System::ServiceModel::Activities::Receive ^ Request { System::ServiceModel::Activities::Receive ^ get(); void set(System::ServiceModel::Activities::Receive ^ value); };
public System.ServiceModel.Activities.Receive Request { get; set; }
member this.Request : System.ServiceModel.Activities.Receive with get, set
Public Property Request As Receive

Valor de propiedad

Receive

Las actividad de recepción asociada al ámbito de recepción de transacción.

Ejemplos

En el ejemplo siguiente se muestra cómo establecer la propiedad Request.

return new Sequence
{
    Activities = 
    {
        new WriteLine { Text = "Service workflow begins." },

        new System.ServiceModel.Activities.TransactedReceiveScope
        {
            Variables = { requestMessage, replyMessage },
            Request = receive,
            Body = new Sequence
            {
                Activities =
                {
                    new WriteLine { Text = new InArgument<string>("Server side: Receive complete.") },
                    
                    new WriteLine { Text = new InArgument<string>(new VisualBasicValue<string>() { ExpressionText = "\"Server side: Received = '\" + requestString.toString() + \"'\"" }) },

                    new PrintTransactionInfo(),

                    new Assign<string>
                    {
                        Value = new InArgument<string>("Server side: Sending reply."),
                        To = new OutArgument<string>(replyMessage)
                    },

                    new WriteLine { Text = new InArgument<string>("Server side: Begin reply.") },

                    new SendReply
                    {
                        Request = receive,
                        Content = SendContent.Create(new InArgument<string>(replyMessage)),                                    
                    },

                    new WriteLine { Text = new InArgument<string>("Server side: Reply sent.") },
                },
            },
        },

        new WriteLine { Text = "Server workflow ends." },
    },
};

Se aplica a