Ejemplo n.º 1
0
        private List <Iteration> GetIteration(RestRequest request)
        {
            var response   = RestClient.Execute(request);
            var iterations = new List <Iteration>();
            var serializer = new RestSharpXmlDeserializer();
            var el         = ParseContent(response);

            iterations.AddRange(el.Elements("iteration").Select(iteration => serializer.Deserialize <Iteration>(iteration.ToString())));
            return(iterations);
        }
Ejemplo n.º 2
0
        List <Story> GetStories(RestRequest request)
        {
            var response = RestClient.Execute(request);

            var stories    = new Stories();
            var serializer = new RestSharpXmlDeserializer();
            var el         = ParseContent(response);

            stories.AddRange(el.Elements("story").Select(storey => serializer.Deserialize <Story>(storey.ToString())));
            return(stories);
        }
Ejemplo n.º 3
0
        public List <Person> GetMembers(int projectId)
        {
            var request = BuildGetRequest();

            request.Resource = string.Format(MemberShipEndpoint, projectId);
            var response   = RestClient.Execute(request);
            var persons    = new List <Person>();
            var serializer = new RestSharpXmlDeserializer();
            var el         = XElement.Parse(response.Content);

            persons.AddRange(el.Elements("membership").Select(person => serializer.Deserialize <Person>(person.ToString())));
            return(persons);
        }
        public List <Project> GetProjects()
        {
            var request = BuildGetRequest();

            request.Resource = ProjectsEndpoint;

            var response   = RestClient.Execute(request);
            var projects   = new List <Project>();
            var serializer = new RestSharpXmlDeserializer();
            var el         = ParseContent(response);

            projects.AddRange(el.Elements("project").Select(project => serializer.Deserialize <Project>(project.ToString())));
            return(projects);
        }
Ejemplo n.º 5
0
        List <Story> GetStoriesByIterationType(int projectId, string iterationType)
        {
            var request = BuildGetRequest();

            request.Resource = string.Format(SpecifiedIterationEndpoint, projectId, iterationType);
            var response = RestClient.Execute(request);

            var stories    = new Stories();
            var serializer = new RestSharpXmlDeserializer();
            var el         = ParseContent(response);

            stories.AddRange(el.Descendants("story").Select(storey => serializer.Deserialize <Story>(storey.ToString())));
            return(stories);
        }