protected override TreeNodeViewModel CreateRoot(ISemanticModel rootSemanticModel, TreeViewModel tree)
 {
     return(rootSemanticModel switch
     {
         GraphSemanticModelForCodeMap graphSemanticModel => CreateGraphNode(graphSemanticModel, tree),
         DacSemanticModel dacSemanticModel => CreateDacNode(dacSemanticModel, tree),
         _ => null,
     });
        protected virtual bool TryToInferGraphOrGraphExtensionSemanticModel(INamedTypeSymbol graphSymbol, PXContext context,
                                                                            out ISemanticModel graphSemanticModel,
                                                                            CancellationToken cancellationToken = default)
        {
            var graphSimpleModel = PXGraphEventSemanticModel.InferModels(context, graphSymbol, cancellationToken).FirstOrDefault();

            if (graphSimpleModel == null || graphSimpleModel.Type == GraphType.None)
            {
                graphSemanticModel = null;
                return(false);
            }

            graphSemanticModel = new GraphSemanticModelForCodeMap(graphSimpleModel, context);
            return(true);
        }
 protected virtual GraphNodeViewModel CreateGraphNode(GraphSemanticModelForCodeMap graph, TreeViewModel tree) =>
 new GraphNodeViewModel(graph, tree, ExpandCreatedNodes);
Пример #4
0
 protected virtual GraphNodeViewModel CreateGraphNode(GraphSemanticModelForCodeMap graph, TreeViewModel tree, bool expand) =>
 new GraphNodeViewModel(graph, tree, expand);