public static void Start() { var root = new CategoryTreeLookup("Source1").GetSimpleMutableCategoryTree(); Display(root); Display(root.PreOrder(n => n.Name != "ESRI")); }
public static void Start() { var root = new CategoryTreeLookup("Source1").GetSimpleMutableCategoryTree(); var sw = new Stopwatch(); sw.Start(); Start(root); sw.Stop(); Console.WriteLine($"\n*** Post data-loaded elapsed time: {sw.Elapsed} ***"); }
public static void Start() { var root = new CategoryTreeLookup("Source1").GetSimpleMutableCategoryTree(); Display(root); var destRoot = new SimpleMutableCategoryNode(root.Item); root.CopyTo(destRoot, n => n.Name != "Database"); Display(destRoot); }
public static void Start() { var dataRoot = new CategoryTreeLookup("Source2").GetCategoryDataTree(); var mutableRoot = new MutableEntityTreeNode <long, CategoryItem>(CategoryEntityDefinition <CategoryItem> .Instance, new CategoryItem(dataRoot.CategoryId, dataRoot.Name)); mutableRoot.Build(dataRoot, x => new CategoryItem(x.CategoryId, x.Name)); Display(mutableRoot); var readOnlyRoot = new ReadOnlyEntityTreeNode <long, CategoryItem>(CategoryEntityDefinition <CategoryItem> .Instance, new CategoryItem(dataRoot.CategoryId, dataRoot.Name)); readOnlyRoot.Build(dataRoot, x => new CategoryItem(x.CategoryId, x.Name)); Display(readOnlyRoot); }
public static void Start() { var root = new CategoryTreeLookup("Source1").GetSimpleMutableCategoryTree(); Display(root); root[327].MoveToParent(325); Display(root); // should be exactly the same position root[326].MoveToParent(325, 0); Display(root); root[326].MoveToParent(325, 1); Display(root); root[327].MoveToParent(325, 2); Display(root); }