Ejemplo n.º 1
0
        public static IList <TcProject> Parse(string projectsXml)
        {
            var xmlDocument  = XDocument.Parse(projectsXml);
            var projectsNode = xmlDocument.Element(ProjectsNode);
            var projectList  = projectsNode.Descendants(ProjectNode);

            return((from project in projectList
                    let id = ParserUtility.GetOptionalAttribute(project, "id")
                             let name = ParserUtility.GetOptionalAttribute(project, "name")
                                        let description = ParserUtility.GetOptionalAttribute(project, "description")
                                                          let href = ParserUtility.GetOptionalAttribute(project, "href")
                                                                     let webUrl = ParserUtility.GetOptionalAttribute(project, "webUrl")
                                                                                  let parentProjectId = ParserUtility.GetOptionalAttribute(project, "parentProjectId")
                                                                                                        select new TcProject(id, name, description, href, webUrl, parentProjectId)).ToList());
        }
Ejemplo n.º 2
0
        public static IList <TcBuildType> Parse(string buildTypesXml)
        {
            var xmlDocument    = XDocument.Parse(buildTypesXml);
            var buildTypesNode = xmlDocument.Element(BuildTypesNode);
            var buildTypeList  = buildTypesNode.Descendants(BuildTypeNode);

            return((from project in buildTypeList
                    let id = ParserUtility.GetOptionalAttribute(project, "id")
                             let name = ParserUtility.GetOptionalAttribute(project, "name")
                                        let projectName = ParserUtility.GetOptionalAttribute(project, "projectName")
                                                          let projectId = ParserUtility.GetOptionalAttribute(project, "projectId")
                                                                          let href = ParserUtility.GetOptionalAttribute(project, "href")
                                                                                     let webUrl = ParserUtility.GetOptionalAttribute(project, "webUrl")
                                                                                                  select new TcBuildType(id, name, projectName, projectId, href, webUrl)).ToList());
        }
Ejemplo n.º 3
0
        public static IList <TcBuild> Parse(string buildsXml)
        {
            var xmlDocument = XDocument.Parse(buildsXml);
            var buildsNode  = xmlDocument.Element(BuildsNode);
            var buildList   = buildsNode.Descendants(BuildNode);

            return((from project in buildList
                    let id = ParserUtility.GetOptionalAttribute(project, "id")
                             let buildTypeId = ParserUtility.GetOptionalAttribute(project, "buildTypeId")
                                               let number = ParserUtility.GetOptionalAttribute(project, "number")
                                                            let status = ParserUtility.GetOptionalAttribute(project, "status")
                                                                         let state = ParserUtility.GetOptionalAttribute(project, "state")
                                                                                     let href = ParserUtility.GetOptionalAttribute(project, "href")
                                                                                                let webUrl = ParserUtility.GetOptionalAttribute(project, "webUrl")
                                                                                                             select new TcBuild(id, buildTypeId, number, status, state, href, webUrl)).ToList());
        }