Esempio n. 1
0
        private ProjectDefinitionFile(string path, XmlDocument document)
            : base(path, document)
        {
            Properties = new ProjectDefinitionProperties(Document.GetElementsByTagName("Properties").Item(0));

            References = new List <Reference>();
            var projectReferenceTags = Document.GetElementsByTagName("ProjectReference");

            for (int i = 0; i < projectReferenceTags.Count; i++)
            {
                var projectReferenceElement = projectReferenceTags.Item(i);

                if (projectReferenceElement is XmlElement element)
                {
                    References.Add(new ProjectReference(this, element));
                }
            }

            var resourceReferenceTags = Document.GetElementsByTagName("ResourceReference");

            for (int i = 0; i < resourceReferenceTags.Count; i++)
            {
                var resourceReferenceElement = resourceReferenceTags.Item(i);

                if (resourceReferenceElement is XmlElement element)
                {
                    References.Add(new ResourceReference(this, element));
                }
            }
        }
Esempio n. 2
0
        private ProjectDefinition(string path, XmlDocument document)
        {
            var projectFile = new FileInfo(path);

            properties = new ProjectDefinitionProperties(projectFile, document);

            References = new List <Reference>();
            var projectReferenceTags = document.GetElementsByTagName("ProjectReference");

            for (int i = 0; i < projectReferenceTags.Count; i++)
            {
                var projectReferenceElement = projectReferenceTags.Item(i);

                if (projectReferenceElement is XmlElement element)
                {
                    References.Add(new ProjectReference(this, element));
                }
            }

            var resourceReferenceTags = document.GetElementsByTagName("ResourceReference");

            for (int i = 0; i < resourceReferenceTags.Count; i++)
            {
                var resourceReferenceElement = resourceReferenceTags.Item(i);

                if (resourceReferenceElement is XmlElement element)
                {
                    References.Add(new ResourceReference(this, element));
                }
            }
            Path          = path;
            this.document = document;
        }
Esempio n. 3
0
        public ProjectDefinitionFile(XmlDocument document)
            : base(document)
        {
            Properties = new ProjectDefinitionProperties(Document.GetElementsByTagName("Properties").Item(0));

            References = new List <Reference>();
            var referencesTag = Document.GetElementsByTagName("ProjectReference");

            for (int i = 0; i < referencesTag.Count; i++)
            {
                var projectReferenceElement = referencesTag.Item(i);

                if (projectReferenceElement is XmlElement element)
                {
                    References.Add(new ProjectReference(this, element));
                }
            }
        }