public PagedDataInquiryResponse <Task> GetTasks(HttpRequestMessage requestMessage) { var request = _pagedDataRequestFactory.Create(requestMessage.RequestUri); var tasks = _allTasksInquiryProcessor.GetTasks(request); return(tasks); }
public object Execute(XElement operationElement) { var modelTasks = _inquiryProcessor.GetTasks(new PagedDataRequest(1, 500) { ExcludedLinks = true }).Items.ToArray(); XNamespace ns = Constants.DefaultLegacyNamespace; using (var stream = new MemoryStream()) { var serializer = new XmlSerializer(typeof(Task[]), Constants.DefaultLegacyNamespace); serializer.Serialize(stream, modelTasks); stream.Seek(0, 0); var xDocument = XDocument.Load(stream, LoadOptions.None); var categoriesAsXElements = xDocument.Descendants(ns + "Task"); return(categoriesAsXElements); } }