Exemple #1
0
        private void Initialize()
        {
            this.rootElements.Clear();
            this.properties.Clear();

            foreach (XmlElement xe in this.xd.SelectNodes("/CamBuildProject/Property"))
            {
                Property prop = (Property)BuildFileElementFactory.Create(xe, this);
                this.properties.Add(prop);
                this.SetPropertyValue(prop.Name, ValueStringEvaluator.Evaluate(prop.Value, this));
            }

            this.rootElements = (List <IBuildFileElement>)BuildFileElementParser.Parse(this.xd, this);
        }
        public static ICollection <IBuildFileElement> Parse(XmlDocument xd, BuildFile parentBuildFile)
        {
            List <IBuildFileElement> elements = new List <IBuildFileElement>();

            foreach (XmlElement xe in xd.DocumentElement.ChildNodes)
            {
                IBuildFileElement element = BuildFileElementFactory.Create(xe, parentBuildFile);

                if (element != null)
                {
                    elements.Add(element);
                }
            }

            return(elements);
        }