Example #1
0
        // Token: 0x0600027B RID: 635 RVA: 0x0000E3AC File Offset: 0x0000C5AC
        void IAirSyncResponse.BuildMultiPartWbXmlResponse(XmlDocument xmlResponse, Stream stream)
        {
            this.context.Response.ContentType = "application/vnd.ms-sync.multipart";
            WbxmlWriter wbxmlWriter = new WbxmlWriter(stream);

            wbxmlWriter.WriteXmlDocument(xmlResponse);
        }
        // Token: 0x060008FE RID: 2302 RVA: 0x00035AF4 File Offset: 0x00033CF4
        private static void ConvertV7StickyOptions(FolderSyncState syncState)
        {
            XmlNode       xmlNode       = null;
            ByteArrayData byteArrayData = (ByteArrayData)syncState[CustomStateDatumType.CachedOptionsNode];

            if (byteArrayData == null || byteArrayData.Data == null)
            {
                return;
            }
            using (MemoryStream memoryStream = new MemoryStream(byteArrayData.Data))
            {
                using (WbxmlReader wbxmlReader = new WbxmlReader(memoryStream))
                {
                    xmlNode = wbxmlReader.ReadXmlDocument().FirstChild;
                    if (xmlNode == null)
                    {
                        return;
                    }
                }
            }
            using (MemoryStream memoryStream2 = new MemoryStream(50))
            {
                WbxmlWriter wbxmlWriter = new WbxmlWriter(memoryStream2);
                XmlElement  xmlElement  = xmlNode.OwnerDocument.CreateElement("Collection", "AirSync:");
                xmlElement.AppendChild(xmlNode);
                wbxmlWriter.WriteXmlDocumentFromElement(xmlElement);
                syncState[CustomStateDatumType.CachedOptionsNode] = new ByteArrayData(memoryStream2.ToArray());
            }
        }
Example #3
0
 // Token: 0x0600027A RID: 634 RVA: 0x0000E33C File Offset: 0x0000C53C
 void IAirSyncResponse.IssueWbXmlResponse()
 {
     if (this.responseWritten)
     {
         AirSyncDiagnostics.TraceError(ExTraceGlobals.ProtocolTracer, this, "[AirSyncResponse.IssueWbXmlResponse] Document has already been written to the HttpResponse stream.");
         return;
     }
     if (this.xmlDocument != null)
     {
         this.httpResponse.ClearContent();
         this.httpResponse.ContentType = "application/vnd.ms-sync.wbxml";
         WbxmlWriter wbxmlWriter = new WbxmlWriter(this.httpResponse.OutputStream);
         wbxmlWriter.WriteXmlDocument(this.xmlDocument);
         this.responseWritten = true;
     }
 }