private static Object ReadIntegral(BinaryParser parser, Type type) { var result = ReadIntegral(parser, Type.GetTypeCode(type)); if (result == null) { BinaryParserException.ThrowUnknownType(type); } return(result); }
private static void ValidateSignature(FieldInfo field, Object value) { var magic = BinaryParser.GetAttribute <MagicSignatureAttribute>(field); if (magic != null) { if (!Equals(value, magic.Signature)) { BinaryParserException.ThrowSignatureException(); } } }