コード例 #1
0
ファイル: RecordParser.cs プロジェクト: zyonet/Pscx
        private static Object ReadIntegral(BinaryParser parser, Type type)
        {
            var result = ReadIntegral(parser, Type.GetTypeCode(type));

            if (result == null)
            {
                BinaryParserException.ThrowUnknownType(type);
            }

            return(result);
        }
コード例 #2
0
ファイル: RecordParser.cs プロジェクト: zyonet/Pscx
        private static void ValidateSignature(FieldInfo field, Object value)
        {
            var magic = BinaryParser.GetAttribute <MagicSignatureAttribute>(field);

            if (magic != null)
            {
                if (!Equals(value, magic.Signature))
                {
                    BinaryParserException.ThrowSignatureException();
                }
            }
        }