예제 #1
0
        public SomeHierarchyViewModel(string title, List <SomeHierarchyViewModel> children, SomeHierarchyViewModel parent = null)
        {
            this.Title    = title;
            this.Parent   = parent;
            this.Children = children;

            if (this.Children != null)
            {
                this.Children.ForEach(ch => ch.Parent = this);
            }
        }
예제 #2
0
        public SomeHierarchyViewModel(string title, List<SomeHierarchyViewModel> children, SomeHierarchyViewModel parent = null)
        {
            this.Title = title;
            this.Parent = parent;
            this.Children = children;

            if (this.Children != null)
            {
                this.Children.ForEach(ch => ch.Parent = this);
            }
        }