private static int getCount(int bytePosition, out int newBytePosition) { int num; byte num1 = Convert.ToByte(Plist.objectTable[bytePosition] & 15); if (num1 >= 15) { num = (int)Plist.parseBinaryInt(bytePosition + 1, out newBytePosition); } else { num = num1; newBytePosition = bytePosition + 1; } return(num); }
private static object parseBinaryInt(int headerPosition) { int num; return(Plist.parseBinaryInt(headerPosition, out num)); }
private static object parseBinary(int objRef) { int item = Plist.objectTable[Plist.offsetTable[objRef]] & 240; if (item <= 48) { if (item > 16) { if (item == 32) { return(Plist.parseBinaryReal(Plist.offsetTable[objRef])); } if (item == 48) { return(Plist.parseBinaryDate(Plist.offsetTable[objRef])); } } else { if (item == 0) { if (Plist.objectTable[Plist.offsetTable[objRef]] == 0) { return(null); } return(Plist.objectTable[Plist.offsetTable[objRef]] == 9 ? true : false); } if (item == 16) { return(Plist.parseBinaryInt(Plist.offsetTable[objRef])); } } } else if (item > 80) { if (item == 96) { return(Plist.parseBinaryUnicodeString(Plist.offsetTable[objRef])); } if (item == 160) { return(Plist.parseBinaryArray(objRef)); } if (item == 208) { return(Plist.parseBinaryDictionary(objRef)); } } else { if (item == 64) { return(Plist.parseBinaryByteArray(Plist.offsetTable[objRef])); } if (item == 80) { return(Plist.parseBinaryAsciiString(Plist.offsetTable[objRef])); } } throw new Exception("This type is not supported"); }