Esempio n. 1
0
        public override IEnumerable <TreeNodeViewModel> VisitNodeAndBuildChildren(ActionNodeViewModel actionNode, bool expandChildren,
                                                                                  CancellationToken cancellation)
        {
            var hasActionHandler = actionNode.MemberCategory.GraphSemanticModel.ActionHandlersByNames.TryGetValue(actionNode.MemberSymbol.Name,
                                                                                                                  out ActionHandlerInfo actionHandler);

            return(hasActionHandler
                                ? new GraphMemberInfoNodeViewModel(actionNode, actionHandler, GraphMemberInfoType.ActionHandler).ToEnumerable()
                                : base.VisitNodeAndBuildChildren(actionNode, expandChildren, cancellation));
        }
 public virtual TResult VisitNode(ActionNodeViewModel actionNode) => DefaultVisit(actionNode);
 public virtual TResult VisitNode(ActionNodeViewModel actionNode, TInput input) => DefaultVisit(actionNode, input);
 public virtual IEnumerable <TreeNodeViewModel> VisitNodeAndBuildChildren(ActionNodeViewModel actionNode, bool expandChildren,
                                                                          CancellationToken cancellation) =>
 Enumerable.Empty <TreeNodeViewModel>();