Example #1
0
        public static XmlElement GetProjectElement(XmlDocument projectDocument)
        {
            var hasProjectNode = ProjectXmlElementOperations.HasProjectElement(projectDocument, out var projectElement);

            if (!hasProjectNode)
            {
                throw new Exception("Project document has no project node.");
            }

            return(projectElement);
        }
Example #2
0
        public static XmlElement AcquireProjectElement(XmlDocument projectDocument)
        {
            var hasProjectNode = ProjectXmlElementOperations.HasProjectElement(projectDocument, out var projectElement);

            if (hasProjectNode)
            {
                return(projectElement);
            }

            projectElement = ProjectXmlElementOperations.AddProjectElement(projectDocument);
            return(projectElement);
        }
Example #3
0
        public static bool HasProjectElement(XmlDocument projectDocument)
        {
            var hasProjectNode = ProjectXmlElementOperations.HasProjectElement(projectDocument, out var dummy);

            return(hasProjectNode);
        }