Exemple #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);
         }
     }
 }
Exemple #2
0
        public static void Pack(object data, string file_path)
        {
            FileStream fileStream = new FileStream(file_path, FileMode.Create);

            CpInazumaMsgPack.Pack(data, fileStream);
            fileStream.Close();
        }
Exemple #3
0
        private static void \uE016(IList \uE041, Stream \uE042)
        {
            int count = \uE041.Count;

            if (CpInazumaMsgPack.\uE005 == CpCustomDataPackMode.Older)
            {
                \uE042.WriteByte(221);
                \uE042.Write(CpInazumaMsgPack.\uE000(BitConverter.GetBytes(count)), 0, 4);
            }
            else
            {
                CpInazumaMsgPack.\uE00B(\uE041.Count, CpInazumaMsgPack.\uE007(count), \uE042);
            }
            for (int i = 0; i < count; i++)
            {
                CpInazumaMsgPack.Pack(\uE041[i], \uE042);
            }
        }
Exemple #4
0
        private static void \uE017(IDictionary \uE043, Stream \uE044)
        {
            int count = \uE043.Count;

            if (CpInazumaMsgPack.\uE005 == CpCustomDataPackMode.Older)
            {
                \uE044.WriteByte(223);
                \uE044.Write(CpInazumaMsgPack.\uE000(BitConverter.GetBytes(count)), 0, 4);
            }
            else
            {
                CpInazumaMsgPack.\uE00B(count, CpInazumaMsgPack.\uE006(count), \uE044);
            }
            foreach (object obj in \uE043)
            {
                DictionaryEntry dictionaryEntry = (DictionaryEntry)obj;
                CpInazumaMsgPack.Pack(dictionaryEntry.Key, \uE044);
                CpInazumaMsgPack.Pack(dictionaryEntry.Value, \uE044);
            }
        }