public override object ReadObject(XmlReader reader) { TwoWayAttachmentResponse TwoWayAttachmentResponseField = null; if (IsParentStartElement(reader, false, true)) { TwoWayAttachmentResponseField = new TwoWayAttachmentResponse(); TwoWayAttachmentResponseField.AnyAttr = ReadAnyAttribute(reader); reader.Read(); if (IsChildStartElement(reader, "Param", true, true)) { reader.Read(); if (IsAttribute(reader, "href")) { string contentID; contentID = reader.Value; reader.MoveToElement(); reader.ReadStartElement("Include", "http://www.w3.org/2004/08/xop/include"); reader.ReadEndElement(); TwoWayAttachmentResponseField.Param = GetBodyPartContent(contentID, BodyParts); } else { TwoWayAttachmentResponseField.Param = ConvertBase64.FromBase64String(reader.ReadString()); reader.ReadEndElement(); } } TwoWayAttachmentResponseField.Any = ReadAnyElement(reader, false); reader.ReadEndElement(); } return(TwoWayAttachmentResponseField); }
public TwoWayAttachmentResponse TwoWayAttachment(TwoWayAttachmentRequest req) { System.Ext.Console.Write("TwoWayAttachment received."); System.Ext.Console.Write("Attachment size = " + req.Param.Length); System.Ext.Console.Write(""); TwoWayAttachmentResponse resp = new TwoWayAttachmentResponse(); HelpIcon testIcon = new HelpIcon(); resp.Param = testIcon.Data.ToArray(); return resp; }
public TwoWayAttachmentResponse TwoWayAttachment(TwoWayAttachmentRequest req) { System.Ext.Console.Write("TwoWayAttachment received."); System.Ext.Console.Write("Attachment size = " + req.Param.Length); System.Ext.Console.Write(""); TwoWayAttachmentResponse resp = new TwoWayAttachmentResponse(); HelpIcon testIcon = new HelpIcon(); resp.Param = testIcon.Data.ToArray(); return(resp); }
public override void WriteObject(XmlWriter writer, object graph) { TwoWayAttachmentResponse TwoWayAttachmentResponseField = ((TwoWayAttachmentResponse)(graph)); if (WriteParentElement(writer, true, true, graph)) { WriteAnyAttribute(writer, TwoWayAttachmentResponseField.AnyAttr); if (WriteChildElement(writer, "Param", true, true, TwoWayAttachmentResponseField.Param)) { BodyParts.Add(CreateNewBodyPart(TwoWayAttachmentResponseField.Param, "<3@body>")); writer.WriteStartElement("xop", "Include", "http://www.w3.org/2004/08/xop/include"); writer.WriteAttributeString(null, "href", null, "cid:3@body"); writer.WriteEndElement(); writer.WriteEndElement(); } WriteAnyElement(writer, TwoWayAttachmentResponseField.Any, false); writer.WriteEndElement(); } return; }
public override object ReadObject(XmlReader reader) { TwoWayAttachmentResponse TwoWayAttachmentResponseField = null; if (IsParentStartElement(reader, false, true)) { TwoWayAttachmentResponseField = new TwoWayAttachmentResponse(); TwoWayAttachmentResponseField.AnyAttr = ReadAnyAttribute(reader); reader.Read(); if (IsChildStartElement(reader, "Param", true, true)) { reader.Read(); if (IsAttribute(reader, "href")) { string contentID; contentID = reader.Value; reader.MoveToElement(); reader.ReadStartElement("Include", "http://www.w3.org/2004/08/xop/include"); reader.ReadEndElement(); TwoWayAttachmentResponseField.Param = GetBodyPartContent(contentID, BodyParts); } else { TwoWayAttachmentResponseField.Param = Convert.FromBase64String(reader.ReadString()); reader.ReadEndElement(); } } TwoWayAttachmentResponseField.Any = ReadAnyElement(reader, false); reader.ReadEndElement(); } return TwoWayAttachmentResponseField; }