/// <summary> /// Read the response from Exchange 2013. /// This method assumes that the reader is currently at the Manifests element. /// </summary> /// <param name="reader">The reader.</param> /* private */ void ReadFromExchange2013Sp1(EwsServiceXmlReader reader) { ////<GetAppManifestsResponse ResponseClass="Success" xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"> //// <ResponseCode>NoError</ResponseCode> //// <m:Apps xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"> //// <t:App xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"> <--- reader should be at this node at the beginning of the loop //// <t:Metadata> //// <t:EndNodeUrl>http://o15.officeredir.microsoft.com/r/rlidMktplcExchRedirect?app=outlook.exe&ver=15&clid=1033&p1=15d0d766d0&p2=4&p3=0&p4=WA&p5=en-US\WA102996382&Scope=2&CallBackURL=https%3a%2f%2fexhv-4880%2fecp%2fExtension%2finstallFromURL.slab%3fexsvurl%3d1&DeployId=EXHV-4680dom.extest.microsoft.com</t:EndNodeUrl> //// <t:AppStatus>2.3</t:AppStatus> //// <t:ActionUrl>http://o15.officeredir.microsoft.com/r/rlidMktplcExchRedirect?app=outlook.exe&ver=15&clid=1033&p1=15d0d766d0&p2=4&p3=0&p4=WA&p5=en-US\WA102996382&Scope=2&CallBackURL=https%3a%2f%2fexhv-4880%2fecp%2fExtension%2finstallFromURL.slab%3fexsvurl%3d1&DeployId=EXHV-4680dom.extest.microsoft.com</t:ActionUrl> //// </t:Metadata> //// <t:Manifest>[base 64 encoded manifest]</t:Manifest> //// </t:App> //// <t:App xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"> //// .... //// <m:Apps> <----- reader should be at this node at the end of the loop while (reader.IsStartElement(XmlNamespace.Types, XmlElementNames.App)) { ClientApp clientApp = new ClientApp(); clientApp.LoadFromXml(reader, XmlElementNames.App); this.Apps.Add(clientApp); this.Manifests.Add(clientApp.Manifest); reader.EnsureCurrentNodeIsEndElement(XmlNamespace.Types, XmlElementNames.App); reader.Read(); } }