示例#1
0
 public override IEnumerable <TreeNodeViewModel> VisitNodeAndBuildChildren(DacGroupingNodeForFieldEventViewModel dacGroupingNode,
                                                                           bool expandChildren, CancellationToken cancellation)
 {
     return(CreateDacChildrenForFieldEvents(dacGroupingNode,
                                            constructor: (dacVm, dacFieldName, dacFieldEvents, isExpanded) =>
                                            new DacFieldGroupingNodeForFieldEventViewModel(dacVm, dacFieldName, dacFieldEvents, isExpanded),
                                            expandChildren, cancellation));
 }
        public override List <TreeNodeViewModel> VisitNode(DacGroupingNodeForFieldEventViewModel dacGroupingNode,
                                                           IEnumerable <TreeNodeViewModel> generatedChildren)
        {
            SortType oldSortType = SortType;

            try
            {
                SortType = SortType.Alphabet;
                return(base.VisitNode(dacGroupingNode, generatedChildren));
            }
            finally
            {
                SortType = oldSortType;
            }
        }
 public virtual TResult VisitNode(DacGroupingNodeForFieldEventViewModel dacGroupingNode) => DefaultVisit(dacGroupingNode);
示例#4
0
 protected virtual IEnumerable <TreeNodeViewModel> CreateDacChildrenForFieldEvents(DacGroupingNodeForFieldEventViewModel dacEventsGroupingNode,
                                                                                   DacFieldVmConstructor constructor, bool expandChildren,
                                                                                   CancellationToken cancellation)
 {
     return(from eventInfo in dacEventsGroupingNode.AllFieldEvents
            group eventInfo by eventInfo.DacFieldName
            into dacFieldEvents
            select constructor(dacEventsGroupingNode, dacFieldEvents.Key, dacFieldEvents, expandChildren)
            into dacFieldNodeVM
                where !dacFieldNodeVM.DacFieldName.IsNullOrEmpty()
            orderby dacFieldNodeVM.DacFieldName ascending
            select dacFieldNodeVM);
 }
 public virtual IEnumerable <TreeNodeViewModel> VisitNodeAndBuildChildren(DacGroupingNodeForFieldEventViewModel dacGroupingNode, bool expandChildren,
                                                                          CancellationToken cancellation) =>
 Enumerable.Empty <TreeNodeViewModel>();