protected virtual GraphNodeViewModel CreateGraphNode(GraphSemanticModelForCodeMap graph, TreeViewModel tree) => new GraphNodeViewModel(graph, tree, ExpandCreatedNodes);
protected virtual DacNodeViewModel CreateDacNode(DacSemanticModel dacSemanticModel, TreeViewModel tree) => new DacNodeViewModel(dacSemanticModel, tree, ExpandCreatedNodes);
protected virtual GraphNodeViewModel CreateGraphNode(GraphSemanticModelForCodeMap graph, TreeViewModel tree, bool expand) => new GraphNodeViewModel(graph, tree, expand);
protected virtual DacNodeViewModel CreateDacNode(DacSemanticModel dacSemanticModel, TreeViewModel tree, bool expand) => new DacNodeViewModel(dacSemanticModel, tree, expand);
protected override TreeNodeViewModel CreateRoot(ISemanticModel rootSemanticModel, TreeViewModel tree) { return(rootSemanticModel switch { GraphSemanticModelForCodeMap graphSemanticModel => CreateGraphNode(graphSemanticModel, tree), DacSemanticModel dacSemanticModel => CreateDacNode(dacSemanticModel, tree), _ => null, });
protected override TreeNodeViewModel CreateRoot(ISemanticModel rootSemanticModel, TreeViewModel tree, bool expandRoots, CancellationToken cancellation) { switch (rootSemanticModel) { case GraphSemanticModelForCodeMap graphSemanticModel: return(CreateGraphNode(graphSemanticModel, tree, expandRoots)); case DacSemanticModel dacSemanticModel: return(CreateDacNode(dacSemanticModel, tree, expandRoots)); default: return(null); } }
protected abstract TreeNodeViewModel CreateRoot(ISemanticModel rootSemanticModel, TreeViewModel tree);
protected abstract TreeNodeViewModel CreateRoot(ISemanticModel rootSemanticModel, TreeViewModel tree, bool expandRoots, CancellationToken cancellation);