writeBinaryByteArray() приватный статический Метод

private static writeBinaryByteArray ( byte value ) : byte[]
value byte
Результат byte[]
        private static byte[] composeBinary(object obj)
        {
            string s = obj.GetType().ToString();
            // ISSUE: reference to a compiler-generated method
            uint stringHash = (uint.Parse(s));

            if (stringHash <= 1541528931U)
            {
                if (stringHash <= 848225627U)
                {
                    if ((int)stringHash != 347085918)
                    {
                        if ((int)stringHash == 848225627 && s == "System.Double")
                        {
                            return(Plist.writeBinaryDouble((double)obj));
                        }
                    }
                    else if (s == "System.Boolean")
                    {
                        return(Plist.writeBinaryBool((bool)obj));
                    }
                }
                else if ((int)stringHash != 1461188995)
                {
                    if ((int)stringHash == 1541528931 && s == "System.DateTime")
                    {
                        return(Plist.writeBinaryDate((DateTime)obj));
                    }
                }
                else if (s == "System.Collections.Generic.List`1[System.Object]")
                {
                    return(Plist.composeBinaryArray((List <object>)obj));
                }
            }
            else if (stringHash <= 4180476474U)
            {
                if ((int)stringHash != -1520294252)
                {
                    if ((int)stringHash == -114490822 && s == "System.Int32")
                    {
                        return(Plist.writeBinaryInteger((int)obj, true));
                    }
                }
                else if (s == "System.Collections.Generic.Dictionary`2[System.String,System.Object]")
                {
                    return(Plist.writeBinaryDictionary((Dictionary <string, object>)obj));
                }
            }
            else if ((int)stringHash != -93602905)
            {
                if ((int)stringHash == -38277272 && s == "System.Byte[]")
                {
                    return(Plist.writeBinaryByteArray((byte[])obj));
                }
            }
            else if (s == "System.String")
            {
                return(Plist.writeBinaryString((string)obj, true));
            }
            return(new byte[0]);
        }
Пример #2
0
        // Token: 0x06000117 RID: 279 RVA: 0x000078C8 File Offset: 0x00005AC8
        private static byte[] composeBinary(object obj)
        {
            string text = obj.GetType().ToString();

            byte[] result;
            switch (text)
            {
            case "System.Collections.Generic.Dictionary`2[System.String,System.Object]":
            {
                byte[] array = Plist.writeBinaryDictionary((Dictionary <string, object>)obj);
                result = array;
                return(result);
            }

            case "System.Collections.Generic.List`1[System.Object]":
            {
                byte[] array = Plist.composeBinaryArray((List <object>)obj);
                result = array;
                return(result);
            }

            case "System.Byte[]":
            {
                byte[] array = Plist.writeBinaryByteArray((byte[])obj);
                result = array;
                return(result);
            }

            case "System.Double":
            {
                byte[] array = Plist.writeBinaryDouble((double)obj);
                result = array;
                return(result);
            }

            case "System.Int32":
            {
                byte[] array = Plist.writeBinaryInteger((int)obj, true);
                result = array;
                return(result);
            }

            case "System.String":
            {
                byte[] array = Plist.writeBinaryString((string)obj, true);
                result = array;
                return(result);
            }

            case "System.DateTime":
            {
                byte[] array = Plist.writeBinaryDate((DateTime)obj);
                result = array;
                return(result);
            }

            case "System.Boolean":
            {
                byte[] array = Plist.writeBinaryBool((bool)obj);
                result = array;
                return(result);
            }
            }
            result = new byte[0];
            return(result);
        }