コード例 #1
0
            private void LoadByType(LitEngine.IO.AESReader _loader)
            {
                switch (ValueType)
                {
                case FieldType.Boolean:
                    dvalue = _loader.ReadBoolean();
                    break;

                case FieldType.Byte:
                    dvalue = _loader.ReadByte();
                    break;

                case FieldType.SByte:
                    dvalue = _loader.ReadSByte();
                    break;

                case FieldType.Int16:
                    dvalue = _loader.ReadInt16();
                    break;

                case FieldType.UInt16:
                    dvalue = _loader.ReadUInt16();
                    break;

                case FieldType.Int32:
                    dvalue = _loader.ReadInt32();
                    break;

                case FieldType.UInt32:
                    dvalue = _loader.ReadUInt32();
                    break;

                case FieldType.Int64:
                    dvalue = _loader.ReadInt64();
                    break;

                case FieldType.UInt64:
                    dvalue = _loader.ReadUInt64();
                    break;

                case FieldType.Single:
                    dvalue = _loader.ReadSingle();
                    break;

                case FieldType.Double:
                    dvalue = _loader.ReadDouble();
                    break;

                case FieldType.Decimal:
                    dvalue = _loader.ReadDecimal();
                    break;

                case FieldType.String:
                    dvalue = _loader.ReadString();
                    break;

                case FieldType.Char:
                    dvalue = _loader.ReadChar();
                    break;

                case FieldType.BigInteger:
                {
                    int    tlen   = _loader.ReadInt32();
                    byte[] tbytes = _loader.ReadBytes(tlen);
                    dvalue = new System.Numerics.BigInteger(tbytes);
                }
                break;

                case FieldType.Bytes:
                {
                    int tlen = _loader.ReadInt32();
                    dvalue = _loader.ReadBytes(tlen);
                }
                break;

                default:
                    break;
                }
            }
コード例 #2
0
        static public object LoadByType(LitEngine.IO.AESReader pLoader)
        {
            FieldType ttype = GetValueTypeByString(pLoader.ReadString());
            object    ret   = null;

            switch (ttype)
            {
            case FieldType.Boolean:
                ret = pLoader.ReadBoolean();
                break;

            case FieldType.Byte:
                ret = pLoader.ReadByte();
                break;

            case FieldType.SByte:
                ret = pLoader.ReadSByte();
                break;

            case FieldType.Int16:
                ret = pLoader.ReadInt16();
                break;

            case FieldType.UInt16:
                ret = pLoader.ReadUInt16();
                break;

            case FieldType.Int32:
                ret = pLoader.ReadInt32();
                break;

            case FieldType.UInt32:
                ret = pLoader.ReadUInt32();
                break;

            case FieldType.Int64:
                ret = pLoader.ReadInt64();
                break;

            case FieldType.UInt64:
                ret = pLoader.ReadUInt64();
                break;

            case FieldType.Single:
                ret = pLoader.ReadSingle();
                break;

            case FieldType.Double:
                ret = pLoader.ReadDouble();
                break;

            case FieldType.Decimal:
                ret = pLoader.ReadDecimal();
                break;

            case FieldType.String:
                ret = pLoader.ReadString();
                break;

            case FieldType.Char:
                ret = pLoader.ReadChar();
                break;

            case FieldType.BigInteger:
            {
                int    tlen   = pLoader.ReadInt32();
                byte[] tbytes = pLoader.ReadBytes(tlen);
                ret = new System.Numerics.BigInteger(tbytes);
            }
            break;

            case FieldType.Bytes:
            {
                int tlen = pLoader.ReadInt32();
                ret = pLoader.ReadBytes(tlen);
            }
            break;

            default:
                break;
            }
            return(ret);
        }