コード例 #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);
        }
コード例 #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);
        }
コード例 #3
0
        public static bool HasProjectElement(XmlDocument projectDocument)
        {
            var hasProjectNode = ProjectXmlElementOperations.HasProjectElement(projectDocument, out var dummy);

            return(hasProjectNode);
        }