Exemple #1
0
        public virtual Result RunAll()
        {
            this.Run();
            bool ParentIsSuccuss = Result.IsSuccess;

            foreach (var item in graphNode.Destinations)
            {
                if (Result.ErrorCode == (int)ErrorCode.fatalError)
                {
                    return(Result);
                }

                GraphNode subNode      = item as GraphNode;
                var       currentLinks = from link in subNode.Links
                                         where link.FromNode == graphNode
                                         select link.GoObject;
                foreach (var link in currentLinks)
                {
                    bool IsNegative = ((link as GoLabeledLink).MidLabel as GoText).Text == "N";
                    if (IsNegative ^ ParentIsSuccuss)
                    {
                        ToolBase tool       = (item as GraphNode).UserObject as ToolBase;
                        Result   ResultTemp = tool.RunAll();
                        if (!ResultTemp.IsSuccess)
                        {
                            Result = ResultTemp;
                        }
                    }
                }
            }
            return(Result);
        }
Exemple #2
0
        protected override Result Action()
        {
            graphNode.Shadowed = false;
            Result             = new Result();
            foreach (var item in graphNode.Destinations)
            {
                ToolBase tool = (item as GraphNode).UserObject as ToolBase;

                if (Result.ErrorCode != (int)ErrorCode.fatalError)
                {
                    Result = tool.RunAll();
                }
            }
            return(Result);
        }