コード例 #1
0
ファイル: ElementNode.cs プロジェクト: m9ra/MEFEditor_v2.0
        /// <summary>
        /// Initializes a new instance of the <see cref="ElementNode"/> class.
        /// </summary>
        /// <param name="element">The element.</param>
        /// <param name="owner">The owner.</param>
        /// <exception cref="System.ArgumentNullException">element</exception>
        internal ElementNode(CodeElement element, FileItemManager owner)
        {
            _owner = owner;
            if (element == null)
            {
                throw new ArgumentNullException("element");
            }
            Element = element;

            if (!element.NoWatchedChildren())
            {
                _elements = element.Children();
            }

            refreshOffset(); //initialize offset
        }
コード例 #2
0
        /// <summary>
        /// Gets children that satisfies constraint on given part.
        /// </summary>
        /// <param name="part">Extending part that is free of generics. If null, all children are returned.</param>
        /// <returns>Children that satisfies part extension.</returns>
        public IEnumerable <ElementPosition> ExtendByChildren(string part)
        {
            var children = Element.Children();

            return(ExtendElements(children, part));
        }