Ejemplo n.º 1
0
        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);
                }
            }
        }
Ejemplo n.º 2
0
        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);
                }
            }
        }
Ejemplo n.º 3
0
        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)
 {
 }
Ejemplo n.º 5
0
 protected virtual DacMemberCategoryNodeViewModel CreateCategory(DacNodeViewModel dac, DacMemberCategory dacMemberCategory) =>
 dacMemberCategory switch
 {
 public virtual IEnumerable <TreeNodeViewModel> VisitNodeAndBuildChildren(DacNodeViewModel dac, bool expandChildren,
                                                                          CancellationToken cancellation) =>
 Enumerable.Empty <TreeNodeViewModel>();
Ejemplo n.º 7
0
 public virtual void VisitNode(DacNodeViewModel dac) => DefaultVisit(dac);
Ejemplo n.º 8
0
 public DacKeysCategoryNodeViewModel(DacNodeViewModel dacViewModel, bool isExpanded) :
     base(dacViewModel, DacMemberCategory.Keys, isExpanded)
 {
 }
 public virtual TResult VisitNode(DacNodeViewModel dac, TInput input) => DefaultVisit(dac, input);
Ejemplo n.º 10
0
 public DacInitializationAndActivationCategoryNodeViewModel(DacNodeViewModel dacViewModel, bool isExpanded) :
     base(dacViewModel, DacMemberCategory.InitializationAndActivation, isExpanded)
 {
 }