本文整理汇总了C#中System.Activities.OutArgument<T>.OutArgument构造函数的典型用法代码示例。如果您正苦于以下问题:C# OutArgument<T>构造函数的具体用法?C# OutArgument<T>怎么用?C# OutArgument<T>使用的例子?那么, 这里精选的构造函数代码示例或许可以为您提供帮助。您也可以进一步了解该构造函数所在类System.Activities.OutArgument<T>
的用法示例。
在下文中一共展示了OutArgument<T>构造函数的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1:
Sequence workflow = new Sequence
{
Variables = { mealExpense, result },
Activities =
{
new Assign<Expense>
{
Value = new InArgument<Expense>( (e) => new Meal { Amount = 50, Location = "Redmond", Vendor = "KFC" }),
To = new OutArgument<Expense>(mealExpense)
},
new WriteLine
{
Text = new InArgument<string>("Hello")
},
approveExpense,
new ReceiveReply
{
Request = approveExpense,
Content = ReceiveContent.Create(new OutArgument<bool>(result))
},
new If
{
Condition = new InArgument<bool> (result),
Then =
new WriteLine
{
Text = new InArgument<string>("Expense Approved")
},
Else =
new WriteLine
{
Text = new InArgument<string>("Expense Cannot be Approved")
},
},
}
};