Ejemplo n.º 1
0
    /// <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&amp;ver=15&amp;clid=1033&amp;p1=15d0d766d0&amp;p2=4&amp;p3=0&amp;p4=WA&amp;p5=en-US\WA102996382&amp;Scope=2&amp;CallBackURL=https%3a%2f%2fexhv-4880%2fecp%2fExtension%2finstallFromURL.slab%3fexsvurl%3d1&amp;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&amp;ver=15&amp;clid=1033&amp;p1=15d0d766d0&amp;p2=4&amp;p3=0&amp;p4=WA&amp;p5=en-US\WA102996382&amp;Scope=2&amp;CallBackURL=https%3a%2f%2fexhv-4880%2fecp%2fExtension%2finstallFromURL.slab%3fexsvurl%3d1&amp;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();
        }
    }