Ejemplo n.º 1
0
 // Token: 0x0600019E RID: 414 RVA: 0x0000B75C File Offset: 0x0000995C
 public static void Serialize(object content, XmlWriter writer)
 {
     if (content == null)
     {
         throw new ArgumentNullException("content");
     }
     if (writer == null)
     {
         throw new ArgumentNullException("writer");
     }
     XmlSerializationHelper.Serialize(content.GetType(), content, writer);
 }
 // Token: 0x0600019D RID: 413 RVA: 0x0000B6D4 File Offset: 0x000098D4
 private void SerializeItem(object item, bool computeContentMd5, out string contentString, out byte[] computedMd5)
 {
     computedMd5 = null;
     using (MemoryStream memoryStream = new MemoryStream())
     {
         using (XmlWriter xmlWriter = XmlWriter.Create(memoryStream, MetaExtractMime.CreateXmlWriterSettings()))
         {
             XmlSerializationHelper.Serialize(item, xmlWriter);
         }
         memoryStream.Seek(0L, SeekOrigin.Begin);
         contentString = Convert.ToBase64String(memoryStream.GetBuffer(), 0, (int)memoryStream.Length, Base64FormattingOptions.InsertLineBreaks);
         if (computeContentMd5)
         {
             computedMd5 = null;
         }
     }
 }
Ejemplo n.º 3
0
 // Token: 0x0600019F RID: 415 RVA: 0x0000B787 File Offset: 0x00009987
 public static void Serialize <T>(T content, XmlWriter writer)
 {
     XmlSerializationHelper.Serialize(typeof(T), content, writer);
 }