本文整理匯總了C#中System.Activities.Statements.ParallelForEach<T>.Values屬性的典型用法代碼示例。如果您正苦於以下問題:C# ParallelForEach<T>.Values屬性的具體用法?C# ParallelForEach<T>.Values怎麽用?C# ParallelForEach<T>.Values使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類System.Activities.Statements.ParallelForEach<T>
的用法示例。
在下文中一共展示了ParallelForEach<T>.Values屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1:
// invite all vendors and wait for their proposals
new ParallelForEach<Vendor>
{
DisplayName = "Get vendor proposals",
Values = new InArgument<IEnumerable<Vendor>>(ctx =>this.Rfp.Get(ctx).InvitedVendors),
Body = new ActivityAction<Vendor>()
{
Argument = iterationVariableVendor,
Handler = new Sequence
{
Variables = { tmpValue },
Activities =
{
// waits for a vendor proposal (creates a bookmark for a vendor)
new WaitForVendorProposal
{
VendorId = new LambdaValue<int>(ctx =>iterationVariableVendor.Get(ctx).Id) ,
Result = new OutArgument<double>(tmpValue)
},
// after the vendor proposal is received, it is registered in the Request for Proposals
new InvokeMethod
{
TargetObject = new InArgument<RequestForProposal>(ctx =>this.Rfp.Get(ctx)),
MethodName = "RegisterProposal",
Parameters =
{
new InArgument<Vendor>(iterationVariableVendor),
new InArgument<double>(tmpValue)
}
},
}
}
}
},