예제 #1
0
        public IEnumerable <TemplateNode> GetProjectNodes()
        {
            if (Type == TemplateType.File)
            {
                throw new ArgumentException("Cannot get project nodes from a file template.");
            }

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

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

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

            return _cachedChildren;
        }