public void AppendChildren(ActivityUtilities.TreeProcessingList nextInstanceList, ref Queue <IList <ActivityInstance> > instancesRemaining)
            {
                // This is only called if there is at least one item in the list.

                if (base.SingleItem != null)
                {
                    nextInstanceList.Add(base.SingleItem);
                }
                else if (nextInstanceList.Count == 0)
                {
                    nextInstanceList.Set(base.MultipleItems);
                }
                else
                {
                    // Next instance list already has some stuff and we have multiple items. Let's
                    // enqueue them for later processing.

                    if (instancesRemaining == null)
                    {
                        instancesRemaining = new Queue <IList <ActivityInstance> >();
                    }

                    instancesRemaining.Enqueue(base.MultipleItems);
                }
            }
示例#2
0
 public void AppendChildren(ActivityUtilities.TreeProcessingList nextInstanceList, ref Queue <IList <System.Activities.ActivityInstance> > instancesRemaining)
 {
     if (base.SingleItem != null)
     {
         nextInstanceList.Add(base.SingleItem);
     }
     else if (nextInstanceList.Count == 0)
     {
         nextInstanceList.Set(base.MultipleItems);
     }
     else
     {
         if (instancesRemaining == null)
         {
             instancesRemaining = new Queue <IList <System.Activities.ActivityInstance> >();
         }
         instancesRemaining.Enqueue(base.MultipleItems);
     }
 }