Example #1
0
 private static void \uE01A(object \uE049, ref \uE017 \uE04A, Stream \uE04B)
 {
     if (CpInazumaMsgPack.\uE005 == CpCustomDataPackMode.Array)
     {
         CpInazumaMsgPack.\uE00B(\uE04A.\uE001.Count, CpInazumaMsgPack.\uE007(\uE04A.\uE001.Count), \uE04B);
     }
     if (CpInazumaMsgPack.\uE005 == CpCustomDataPackMode.Raw || CpInazumaMsgPack.\uE005 == CpCustomDataPackMode.Array)
     {
         for (int i = 0; i < \uE04A.\uE001.Count; i++)
         {
             \uE016 uE = \uE04A.\uE001[i];
             CpInazumaMsgPack.Pack(uE.\uE002.GetValue(\uE049), \uE04B);
         }
         return;
     }
     if (CpInazumaMsgPack.\uE005 == CpCustomDataPackMode.Map || CpInazumaMsgPack.\uE005 == CpCustomDataPackMode.Older)
     {
         CpInazumaMsgPack.\uE00B(\uE04A.\uE001.Count, CpInazumaMsgPack.\uE006(\uE04A.\uE001.Count), \uE04B);
         for (int j = 0; j < \uE04A.\uE001.Count; j++)
         {
             \uE016 uE2 = \uE04A.\uE001[j];
             CpInazumaMsgPack.\uE018(uE2.\uE001, \uE04B);
             CpInazumaMsgPack.Pack(uE2.\uE002.GetValue(\uE049), \uE04B);
         }
     }
 }
Example #2
0
 public static void Pack(object data, Stream stream)
 {
     if (stream != null)
     {
         if (stream.CanWrite)
         {
             if (data == null)
             {
                 CpInazumaMsgPack.\uE00B(null, global::\uE015.\uE00A, stream);
                 return;
             }
             if (data.GetType().IsPrimitive)
             {
                 CpInazumaMsgPack.\uE015(data, stream);
                 return;
             }
             if (data is string)
             {
                 CpInazumaMsgPack.\uE018((string)data, stream);
                 return;
             }
             if (data is byte[])
             {
                 CpInazumaMsgPack.\uE019((byte[])data, stream);
                 return;
             }
             if (data is IList)
             {
                 CpInazumaMsgPack.\uE016((IList)data, stream);
                 return;
             }
             if (data is IDictionary)
             {
                 CpInazumaMsgPack.\uE017((IDictionary)data, stream);
                 return;
             }
             \uE017 uE = default(\uE017);
             if (CpInazumaMsgPack.\uE022(data.GetType(), ref uE))
             {
                 CpInazumaMsgPack.\uE01A(data, ref uE, stream);
             }
             return;
         }
     }
     throw new IOException(global::\uE019.\uE000(11502));
 }