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); } } }
private static object \uE020(Stream \uE05D, ref \uE017 \uE05E) { sbyte b = 0; \uE015 uE = CpInazumaMsgPack.\uE00A(\uE05D, out b); object obj = Activator.CreateInstance(\uE05E.\uE000); if (CpInazumaMsgPack.\uE010(uE)) { int num = CpInazumaMsgPack.\uE005(\uE05D, uE, b); for (int i = 0; i < num; i++) { CpInazumaMsgPack.\uE001 uE2 = new CpInazumaMsgPack.\uE001(); uE = CpInazumaMsgPack.\uE00A(\uE05D, out b); uE2.\uE000 = CpInazumaMsgPack.\uE01E(\uE05D, uE, b); \uE016 uE3 = \uE05E.\uE001.Find(new Predicate <\uE016>(uE2.\uE000)); if (uE3 == null) { CpInazumaMsgPack.Unpack(\uE05D, typeof(object)); } else { TypeCode typeCode = Type.GetTypeCode(uE3.\uE002.FieldType); object value = CpInazumaMsgPack.\uE014(CpInazumaMsgPack.Unpack(\uE05D, uE3.\uE002.FieldType), typeCode); uE3.\uE002.SetValue(obj, value); } } return(obj); } if (CpInazumaMsgPack.\uE00F(uE)) { \uE05D.Seek((long)CpInazumaMsgPack.\uE004(uE, b), SeekOrigin.Current); return(CpInazumaMsgPack.\uE020(\uE05D, ref \uE05E)); } \uE05D.Seek(-1L, SeekOrigin.Current); if (uE == global::\uE015.\uE00A) { return(null); } for (int j = 0; j < \uE05E.\uE001.Count; j++) { FieldInfo uE4 = \uE05E.\uE001[j].\uE002; object obj2 = CpInazumaMsgPack.Unpack(\uE05D, uE4.FieldType); if (obj2 != null) { uE4.SetValue(obj, Convert.ChangeType(obj2, uE4.FieldType)); } } return(obj); }
internal static \uE016[] \uE002(int[] \uE000) { \uE016[] array = new \uE016[\uE000.Length]; for (;;) { int num = \uE011.\uE006(92); for (;;) { int num2; switch (num) { case 0: num2 = 0; num = 2; continue; case 1: IL_20: array[num2].\uE001 = \uE000[num2]; num = 3; continue; case 2: if (num2 != 0) { num = 1; continue; } goto IL_44; case 3: num2++; goto IL_44; } break; IL_44: if (num2 >= \uE000.Length) { goto Block_2; } goto IL_20; } } Block_2: \uE012.\uE003(array); return(array); }
public bool \uE000(\uE016 \uE069) { return(\uE069.\uE001 == this.\uE000); }
private static int \uE025(\uE016 \uE067, \uE016 \uE068) { return(StringComparer.Ordinal.Compare(\uE067.\uE001, \uE068.\uE001)); }
private static int \uE024(\uE016 \uE065, \uE016 \uE066) { return(\uE065.\uE000.CompareTo(\uE066.\uE000)); }
private static bool \uE022(Type \uE060, ref \uE017 \uE061) { if (CpInazumaMsgPack.\uE007.TryGetValue(\uE060, out \uE061)) { return(true); } if (\uE060.IsPrimitive || typeof(IList).IsAssignableFrom(\uE060) || typeof(IDictionary).IsAssignableFrom(\uE060) || \uE060 == typeof(object) || typeof(string) == \uE060) { return(false); } BindingFlags bindingAttr = BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; FieldInfo[] fields = \uE060.GetFields(bindingAttr); List <\uE016> list = new List <\uE016>(fields.Length); bool flag = false; foreach (FieldInfo fieldInfo in fields) { if (!fieldInfo.IsDefined(typeof(NonSerializedAttribute), false)) { \uE016 uE = new \uE016(); uE.\uE001 = fieldInfo.Name; uE.\uE000 = int.MaxValue; uE.\uE002 = fieldInfo; object[] customAttributes = fieldInfo.GetCustomAttributes(typeof(CpSerializeFieldAttribute), false); if (customAttributes.Length > 0 && customAttributes[0] is CpSerializeFieldAttribute) { flag = true; CpSerializeFieldAttribute cpSerializeFieldAttribute = customAttributes[0] as CpSerializeFieldAttribute; uE.\uE001 = (cpSerializeFieldAttribute.Name ?? fieldInfo.Name); uE.\uE000 = cpSerializeFieldAttribute.Order; } list.Add(uE); } } if (flag) { List <\uE016> list2 = list; if (CpInazumaMsgPack.\uE00B == null) { CpInazumaMsgPack.\uE00B = new Comparison <\uE016>(CpInazumaMsgPack.\uE024); } list2.Sort(CpInazumaMsgPack.\uE00B); } else { List <\uE016> list3 = list; if (CpInazumaMsgPack.\uE00C == null) { CpInazumaMsgPack.\uE00C = new Comparison <\uE016>(CpInazumaMsgPack.\uE025); } list3.Sort(CpInazumaMsgPack.\uE00C); } \uE017 uE2 = default(\uE017); uE2.\uE000 = \uE060; uE2.\uE001 = list; CpInazumaMsgPack.\uE007[\uE060] = uE2; \uE017 uE3 = default(\uE017); for (int j = 0; j < list.Count; j++) { CpInazumaMsgPack.\uE022(list[j].\uE002.FieldType, ref uE3); } \uE061 = uE2; return(true); }