Пример #1
0
        public IEnumerable <TemplateNode> GetFileNodes()
        {
            if (Type == TemplateType.Project)
            {
                throw new ArgumentException("Cannot get file nodes from a project template.");
            }

            if (_cachedChildren.Count == 0)
            {
                foreach (XmlNode node in XmlNode.ChildNodes)
                {
                    var item = new FileTemplateNode(node);
                    _cachedChildren.Add(item);
                }
            }

            return(_cachedChildren);
        }
        public IEnumerable<TemplateNode> GetFileNodes()
        {
            if (Type == TemplateType.Project)
                throw new ArgumentException("Cannot get file nodes from a project template.");

            if (_cachedChildren.Count == 0)
            {
                foreach (XmlNode node in XmlNode.ChildNodes)
                {
                    var item = new FileTemplateNode(node);
                    _cachedChildren.Add(item);
                }
            }

            return _cachedChildren;
        }