Exemple #1
0
        private HierarchyItem CreateItem(string fileName, HierarchyItemType itemType, HierarchyNode node)
        {
            HierarchyItem parent = this.ancestors.Count > 0 ? this.ancestors.Peek() : null;
            var           result = new HierarchyItem(fileName, itemType, node.Caption, parent);

            return(result);
        }
Exemple #2
0
        public HierarchyItem(string fileName, HierarchyItemType itemType, string caption, HierarchyItem parent)
        {
            this.FileName = fileName;
            this.ItemType = itemType;

            // Note: Solution captions can contain the Unicode Left-To-Right Order Mark (0x200E) character.
            // It doesn't hurt anything usually, but it can show up as ? if it's incorrectly decoded.
            this.Caption = caption;
            this.Parent  = parent;
            this.Level   = parent != null ? parent.Level + 1 : 0;
        }