TransactedReceiveScope.Variables プロパティ

定義

この Variable に関連付けられている TransactedReceiveScope のコレクションを取得します。

public:
 property System::Collections::ObjectModel::Collection<System::Activities::Variable ^> ^ Variables { System::Collections::ObjectModel::Collection<System::Activities::Variable ^> ^ get(); };
public System.Collections.ObjectModel.Collection<System.Activities.Variable> Variables { get; }
member this.Variables : System.Collections.ObjectModel.Collection<System.Activities.Variable>
Public ReadOnly Property Variables As Collection(Of Variable)

プロパティ値

Collection<Variable>

トランザクション処理された受信スコープに関連付けられている変数。

Variables プロパティを設定する方法を次の例に示します。

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

適用対象