Freigeben über


TransactedReceiveScope.Request Eigenschaft

Definition

Ruft die Receive-Aktivität ab, die dieser TransactedReceiveScope-Aktivität zugeordnet ist, oder legt sie fest.

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

Eigenschaftswert

Receive

Die dem transaktiven Empfangsbereich zugeordnete Empfangsaktivität.

Beispiele

Im folgenden Beispiel wird das Festlegen der Request-Eigenschaft veranschaulicht.

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." },
    },
};

Gilt für