Esempio n. 1
0
 private static IEnumerable <MetaTBManifest.DesignType> FlattenDesignType(MetaTBManifest.DesignType e)
 {
     if (e.Type != "Component")
     {
         return((new[] { e }).Concat(e.Children.SelectMany(c => FlattenDesignType(c))));
     }
     return(new[] { e });
 }
Esempio n. 2
0
 private static bool DesignTypeIsSelected(MetaTBManifest.DesignType e)
 {
     if (e.Selected == true)
     {
         return(true);
     }
     if (e.Children != null)
     {
         foreach (var child in e.Children)
         {
             if (DesignTypeIsSelected(child))
             {
                 return(true);
             }
         }
     }
     return(false);
 }