public sealed class GenericActivity<T> : CodeActivity
{
public InArgument<ICollection<T>> myCollection { get; set; }
protected override void Execute(CodeActivityContext context)
{
ICollection<T> list = this.myCollection.Get<ICollection<T>>(context);
foreach (T obj in list)
{
Console.WriteLine(obj.ToString());
}
}
}使用
流程
宿主WorkflowInvoker.Invoke(new Workflow1());结果
本文配套源码: