protected virtual IEnumerable <TreeNodeViewModel> CreateEventsCategoryChildren <TGraphEventInfo>(GraphEventCategoryNodeViewModel graphEventCategory, DacVmConstructor <TGraphEventInfo> constructor, bool expandChildren, CancellationToken cancellation) where TGraphEventInfo : GraphEventInfoBase <TGraphEventInfo> { graphEventCategory.ThrowOnNull(nameof(graphEventCategory)); var graphSemanticModel = graphEventCategory.GraphViewModel.GraphSemanticModel; var graphCategoryEvents = graphEventCategory.GetCategoryGraphNodeSymbols() ?.OfType <TGraphEventInfo>() .Where(eventInfo => eventInfo.SignatureType != EventHandlerSignatureType.None); if (graphCategoryEvents.IsNullOrEmpty()) { return(Enumerable.Empty <TreeNodeViewModel>()); } var dacGroupingNodesViewModels = from eventInfo in graphCategoryEvents where eventInfo.Symbol.ContainingType == graphSemanticModel.Symbol || eventInfo.Symbol.ContainingType.OriginalDefinition == graphSemanticModel.Symbol.OriginalDefinition group eventInfo by eventInfo.DacName into graphEventsForDAC select constructor(graphEventCategory, graphEventsForDAC.Key, graphEventsForDAC, expandChildren) into dacNodeVM where dacNodeVM != null orderby dacNodeVM.DacName ascending select dacNodeVM; return(dacGroupingNodesViewModels); }
public DacGroupingNodeForCacheAttachedEventViewModel(GraphEventCategoryNodeViewModel graphEventsCategoryVM, string dacName, IEnumerable <GraphFieldEventInfo> cacheAttachedEvents, bool isExpanded) : base(graphEventsCategoryVM, dacName, cacheAttachedEvents, isExpanded) { }
public DacGroupingNodeForRowEventViewModel(GraphEventCategoryNodeViewModel graphEventsCategoryVM, string dacName, IEnumerable <GraphRowEventInfo> rowEvents, bool isExpanded) : base(graphEventsCategoryVM, dacName, isExpanded) { RowEvents = rowEvents?.ToImmutableArray() ?? ImmutableArray.Create <GraphRowEventInfo>(); }