Exemplo n.º 1
0
        public static string FindTreeExecutionTag(this ComponentNode thisParam, List <ComponentNode> componentParams)
        {
            ComponentNode param = componentParams.FirstOrDefault(c => c.StartNode);

            if (param != null)
            {
                return(param.TreeExecutionTag);
            }
            return("");
        }
Exemplo n.º 2
0
 public static void FindParentTree(this ComponentNode thisParam,
                                   List <ComponentNode> componentParams,
                                   HashSet <ComponentNode> parentTreeParams)
 {
     foreach (Guid id in thisParam.ParentIdList)
     {
         ComponentNode param = componentParams.FirstOrDefault(c => c.Id == id);
         if (param != null)
         {
             parentTreeParams.Add(param);
             FindParentTree(param, componentParams, parentTreeParams);
         }
     }
 }
Exemplo n.º 3
0
 public static ComponentNode FindChild(this ComponentNode thisParam, List <ComponentNode> componentParams)
 {
     return(thisParam.FindChildren(componentParams).Count > 0
                                       ? thisParam.FindChildren(componentParams)[0]
                                       : null);
 }
Exemplo n.º 4
0
 public static List <ComponentNode> FindChildren(this ComponentNode thisParam, List <ComponentNode> componentParams)
 {
     return(componentParams.FindAll(c => (c.ParentIdList.FirstOrDefault(p => p == thisParam.Id) != new Guid())));
 }
Exemplo n.º 5
0
 public static ComponentNode FindStartupNode(this ComponentNode thisParam, List <ComponentNode> componentParams)
 {
     return(componentParams.FirstOrDefault(c => c.StartNode == true));
 }
Exemplo n.º 6
0
 public static List <ComponentNode> FindThisExecutableInTree(this ComponentNode thisParam, List <ComponentNode> componentParams)
 {
     return(componentParams.FindAll(c => c.CompopnentExcutionName == thisParam.CompopnentExcutionName).ToList());
 }
Exemplo n.º 7
0
 public static ComponentNode FindNodeByName(this ComponentNode thisParam, string name,
                                            List <ComponentNode> componentParams)
 {
     return(componentParams.FirstOrDefault(c => c.ComponentName == name));
 }