parseBinaryInt() private static method

private static parseBinaryInt ( int headerPosition ) : object
headerPosition int
return object
        private static int getCount(int bytePosition, out int newBytePosition)
        {
            byte num1 = Convert.ToByte((int)Plist.objectTable[bytePosition] & 15);
            int  num2;

            if ((int)num1 < 15)
            {
                num2            = (int)num1;
                newBytePosition = bytePosition + 1;
            }
            else
            {
                num2 = (int)Plist.parseBinaryInt(bytePosition + 1, out newBytePosition);
            }
            return(num2);
        }
Beispiel #2
0
        // Token: 0x06000124 RID: 292 RVA: 0x00008098 File Offset: 0x00006298
        private static int getCount(int bytePosition, out int newBytePosition)
        {
            byte b  = Plist.objectTable[bytePosition];
            byte b2 = Convert.ToByte((int)(b & 15));
            int  result;

            if (b2 < 15)
            {
                result          = (int)b2;
                newBytePosition = bytePosition + 1;
            }
            else
            {
                result = (int)Plist.parseBinaryInt(bytePosition + 1, out newBytePosition);
            }
            return(result);
        }
        private static object parseBinary(int objRef)
        {
            switch ((int)Plist.objectTable[Plist.offsetTable[objRef]] & 240)
            {
            case 96:
                return(Plist.parseBinaryUnicodeString(Plist.offsetTable[objRef]));

            case 160:
                return(Plist.parseBinaryArray(objRef));

            case 208:
                return(Plist.parseBinaryDictionary(objRef));

            case 64:
                return(Plist.parseBinaryByteArray(Plist.offsetTable[objRef]));

            case 80:
                return(Plist.parseBinaryAsciiString(Plist.offsetTable[objRef]));

            case 32:
                return(Plist.parseBinaryReal(Plist.offsetTable[objRef]));

            case 48:
                return(Plist.parseBinaryDate(Plist.offsetTable[objRef]));

            case 0:
                if ((int)Plist.objectTable[Plist.offsetTable[objRef]] != 0)
                {
                    return((object)((int)Plist.objectTable[Plist.offsetTable[objRef]] == 9));
                }
                return((object)null);

            case 16:
                return(Plist.parseBinaryInt(Plist.offsetTable[objRef]));

            default:
                throw new Exception("This type is not supported");
            }
        }
        private static object parseBinaryInt(int headerPosition)
        {
            int newHeaderPosition;

            return(Plist.parseBinaryInt(headerPosition, out newHeaderPosition));
        }
Beispiel #5
0
        // Token: 0x06000125 RID: 293 RVA: 0x000080E0 File Offset: 0x000062E0
        private static object parseBinary(int objRef)
        {
            byte b   = Plist.objectTable[Plist.offsetTable[objRef]];
            int  num = (int)(b & 240);

            if (num <= 48)
            {
                if (num <= 16)
                {
                    if (num == 0)
                    {
                        object result = (objectTable[offsetTable[objRef]] == 0) ? null : (object)(objectTable[offsetTable[objRef]] == 9);
                        return(result);
                    }
                    if (num == 16)
                    {
                        object result = Plist.parseBinaryInt(Plist.offsetTable[objRef]);
                        return(result);
                    }
                }
                else
                {
                    if (num == 32)
                    {
                        object result = Plist.parseBinaryReal(Plist.offsetTable[objRef]);
                        return(result);
                    }
                    if (num == 48)
                    {
                        object result = Plist.parseBinaryDate(Plist.offsetTable[objRef]);
                        return(result);
                    }
                }
            }
            else if (num <= 80)
            {
                if (num == 64)
                {
                    object result = Plist.parseBinaryByteArray(Plist.offsetTable[objRef]);
                    return(result);
                }
                if (num == 80)
                {
                    object result = Plist.parseBinaryAsciiString(Plist.offsetTable[objRef]);
                    return(result);
                }
            }
            else
            {
                if (num == 96)
                {
                    object result = Plist.parseBinaryUnicodeString(Plist.offsetTable[objRef]);
                    return(result);
                }
                if (num == 160)
                {
                    object result = Plist.parseBinaryArray(objRef);
                    return(result);
                }
                if (num == 208)
                {
                    object result = Plist.parseBinaryDictionary(objRef);
                    return(result);
                }
            }
            throw new Exception("This type is not supported");
        }