Exemple #1
0
 public CallerActionBuilder(List <BuilderModel> builds, string caller = "Instance", int slice = 3)
 {
     Caller    = caller;
     Slice     = slice;
     Script    = new StringBuilder();
     BuildTree = new BTFindTree <BuilderModel>(builds.ToArray(), Slice);
 }
Exemple #2
0
 public void Foreach(BTFindTree <BuilderModel> tree, Action <BTFindTree <BuilderModel>, Action, Action> nodeAction, Action <BTFindTree <BuilderModel>, TreeType> LeavesAction, TreeType treeType = TreeType.None, int deepth = 0)
 {
     if (tree.CompareCode != 0)
     {
         deepth += 1;
         nodeAction(tree,
                    () => { Foreach(tree.LssTree, nodeAction, LeavesAction, TreeType.Lss, deepth); },
                    () => { Foreach(tree.GtrTree, nodeAction, LeavesAction, TreeType.Gtr, deepth); });
     }
     else
     {
         LeavesAction(tree, treeType);
     }
 }