public override void CollectSourceValues(UInt32 taskId, List <UInt32> usedBranches, MethodClass mc)
 {
     if (usedBranches.Contains(this.BranchId))
     {
         return;
     }
     usedBranches.Add(this.BranchId);
     if (_count != null)
     {
         List <ISourceValuePointer> l = new List <ISourceValuePointer>();
         _count.GetValueSources(l);
         if (taskId != 0)
         {
             foreach (ISourceValuePointer p in l)
             {
                 p.SetTaskId(taskId);
             }
         }
         mc.AddValueSources(l);
     }
     base.CollectSourceValues(taskId, usedBranches, mc);
 }
Пример #2
0
        private IList <ISourceValuePointer> getProperties(UInt32 taskId, bool client)
        {
            List <ISourceValuePointer> list = new List <ISourceValuePointer>();

            if (_condition != null)
            {
                IList <ISourceValuePointer> l1 = _condition.GetValueSources();
                if (l1 != null && l1.Count > 0)
                {
                    foreach (ISourceValuePointer p in l1)
                    {
                        if (taskId != 0)
                        {
                            p.SetTaskId(taskId);
                        }
                        if (p.IsWebClientValue())
                        {
                            if (client)
                            {
                                list.Add(p);
                            }
                        }
                        else
                        {
                            if (!client)
                            {
                                list.Add(p);
                            }
                        }
                    }
                }
            }
            if (_val != null)
            {
                List <ISourceValuePointer> l2 = new List <ISourceValuePointer>();
                _val.GetValueSources(l2);
                if (l2.Count > 0)
                {
                    foreach (ISourceValuePointer p in l2)
                    {
                        if (taskId != 0)
                        {
                            p.SetTaskId(taskId);
                        }
                        bool found = false;
                        foreach (ISourceValuePointer p2 in list)
                        {
                            if (p2.IsSameProperty(p))
                            {
                                found = true;
                                break;
                            }
                        }
                        if (!found)
                        {
                            if (p.IsWebClientValue())
                            {
                                if (client)
                                {
                                    list.Add(p);
                                }
                            }
                            else
                            {
                                if (!client)
                                {
                                    list.Add(p);
                                }
                            }
                        }
                    }
                }
            }
            return(list);
        }