示例#1
0
        // Token: 0x060001ED RID: 493 RVA: 0x00007BFC File Offset: 0x00005DFC
        private static byte[] composeBinary(object obj)
        {
            string left = obj.GetType().ToString();

            byte[] result;
            if (Operators.CompareString(left, "System.Collections.Generic.Dictionary`2[System.String,System.Object]", false) == 0)
            {
                byte[] array = Plist.writeBinaryDictionary((Dictionary <string, object>)obj);
                result = array;
            }
            else if (Operators.CompareString(left, "System.Collections.Generic.List`1[System.Object]", false) == 0)
            {
                byte[] array = Plist.composeBinaryArray((List <object>)obj);
                result = array;
            }
            else if (Operators.CompareString(left, "System.Byte[]", false) == 0)
            {
                byte[] array = Plist.writeBinaryByteArray((byte[])obj);
                result = array;
            }
            else if (Operators.CompareString(left, "System.Double", false) == 0)
            {
                byte[] array = Plist.writeBinaryDouble((double)obj);
                result = array;
            }
            else if (Operators.CompareString(left, "System.Int32", false) == 0)
            {
                byte[] array = Plist.writeBinaryInteger((int)obj, true);
                result = array;
            }
            else if (Operators.CompareString(left, "System.String", false) == 0)
            {
                byte[] array = Plist.writeBinaryString((string)obj, true);
                result = array;
            }
            else if (Operators.CompareString(left, "System.DateTime", false) == 0)
            {
                byte[] array = Plist.writeBinaryDate((DateTime)obj);
                result = array;
            }
            else if (Operators.CompareString(left, "System.Boolean", false) == 0)
            {
                byte[] array = Plist.writeBinaryBool((bool)obj);
                result = array;
            }
            else
            {
                result = new byte[0];
            }
            return(result);
        }