public override IEnumerable <TreeNodeViewModel> VisitNode(DacNodeViewModel dac) { foreach (DacMemberCategory dacMemberCategory in GetDacMemberCategoriesInOrder()) { Cancellation.ThrowIfCancellationRequested(); var dacCategory = CreateCategory(dac, dacMemberCategory); if (dacCategory != null) { yield return(dacCategory); } } }
public override IEnumerable <TreeNodeViewModel> VisitNodeAndBuildChildren(DacNodeViewModel dac, bool expandChildren, CancellationToken cancellation) { foreach (DacMemberCategory dacMemberCategory in GetDacMemberCategoriesInOrder()) { cancellation.ThrowIfCancellationRequested(); var dacCategory = CreateCategory(dac, dacMemberCategory, expandChildren); if (dacCategory != null) { yield return(dacCategory); } } }
protected virtual DacMemberCategoryNodeViewModel CreateCategory(DacNodeViewModel dac, DacMemberCategory dacMemberCategory, bool isExpanded) { switch (dacMemberCategory) { case DacMemberCategory.Keys: return(new DacKeysCategoryNodeViewModel(dac, isExpanded)); case DacMemberCategory.Property: return(new DacPropertiesCategoryNodeViewModel(dac, isExpanded)); case DacMemberCategory.FieldsWithoutProperty: default: return(null); } }
public DacPropertiesCategoryNodeViewModel(DacNodeViewModel dacViewModel, bool isExpanded) : base(dacViewModel, DacMemberCategory.Property, isExpanded) { }
protected virtual DacMemberCategoryNodeViewModel CreateCategory(DacNodeViewModel dac, DacMemberCategory dacMemberCategory) => dacMemberCategory switch {
public virtual IEnumerable <TreeNodeViewModel> VisitNodeAndBuildChildren(DacNodeViewModel dac, bool expandChildren, CancellationToken cancellation) => Enumerable.Empty <TreeNodeViewModel>();
public virtual void VisitNode(DacNodeViewModel dac) => DefaultVisit(dac);
public DacKeysCategoryNodeViewModel(DacNodeViewModel dacViewModel, bool isExpanded) : base(dacViewModel, DacMemberCategory.Keys, isExpanded) { }
public virtual TResult VisitNode(DacNodeViewModel dac, TInput input) => DefaultVisit(dac, input);
public DacInitializationAndActivationCategoryNodeViewModel(DacNodeViewModel dacViewModel, bool isExpanded) : base(dacViewModel, DacMemberCategory.InitializationAndActivation, isExpanded) { }