/// <exception cref="System.IO.IOException" />
 public virtual void ReadPortable(IPortableReader reader)
 {
     name    = reader.ReadString("name");
     address = reader.ReadPortable <PortableAddress>("address");
     height  = reader.ReadLong("height");
     age     = reader.ReadInt("age");
 }
 public override void ReadPortable(IPortableReader reader)
 {
     base.ReadPortable(reader);
     if (reader.HasField("v"))
     {
         v = reader.ReadInt("v");
     }
 }
 /// <exception cref="System.IO.IOException"/>
 public virtual void ReadPortable(IPortableReader reader)
 {
     aByte     = reader.ReadByte("byte");
     aBoolean  = reader.ReadBoolean("boolean");
     character = reader.ReadChar("char");
     aShort    = reader.ReadShort("short");
     integer   = reader.ReadInt("int");
     aLong     = reader.ReadLong("long");
     aFloat    = reader.ReadFloat("float");
     aDouble   = reader.ReadDouble("double");
     aString   = reader.ReadUTF("string");
 }
 /// <exception cref="System.IO.IOException"/>
 public virtual void ReadPortable(IPortableReader reader)
 {
     aByte = reader.ReadByte("byte");
     aBoolean = reader.ReadBoolean("boolean");
     character = reader.ReadChar("char");
     aShort = reader.ReadShort("short");
     integer = reader.ReadInt("int");
     aLong = reader.ReadLong("long");
     aFloat = reader.ReadFloat("float");
     aDouble = reader.ReadDouble("double");
     aString = reader.ReadUTF("string");
 }
Пример #5
0
 public void ReadPortable(IPortableReader reader)
 {
     b   = reader.ReadByte("b");
     bo  = reader.ReadBoolean("bool");
     c   = reader.ReadChar("c");
     s   = reader.ReadShort("s");
     i   = reader.ReadInt("i");
     l   = reader.ReadLong("l");
     f   = reader.ReadFloat("f");
     d   = reader.ReadDouble("d");
     str = reader.ReadUTF("str");
     p   = reader.ReadPortable <InnerPortable>("p");
 }
        public virtual void TestReadInt()
        {
            var aByte  = reader.ReadInt("byte");
            var aShort = reader.ReadInt("short");
            var aChar  = reader.ReadInt("char");
            var aInt   = reader.ReadInt("int");

            Assert.AreEqual(1, aByte);
            Assert.AreEqual(3, aShort);
            Assert.AreEqual(2, aChar);
            Assert.AreEqual(4, aInt);
            Assert.AreEqual(0, reader.ReadInt("NO SUCH FIELD"));
        }
Пример #7
0
 public void ReadPortable(IPortableReader reader)
 {
     Bool        = reader.ReadBoolean("bool");
     BoolArray   = reader.ReadBooleanArray("boolArray");
     Byte        = reader.ReadByte("byte");
     ByteArray   = reader.ReadByteArray("byteArray");
     Char        = reader.ReadChar("char");
     CharArray   = reader.ReadCharArray("charArray");
     Short       = reader.ReadShort("short");
     ShortArray  = reader.ReadShortArray("shortArray");
     Int         = reader.ReadInt("int");
     IntArray    = reader.ReadIntArray("intArray");
     Long        = reader.ReadLong("long");
     LongArray   = reader.ReadLongArray("longArray");
     Float       = reader.ReadFloat("float");
     FloatArray  = reader.ReadFloatArray("floatArray");
     Double      = reader.ReadDouble("double");
     DoubleArray = reader.ReadDoubleArray("doubleArray");
     String      = reader.ReadUTF("string");
     StringArray = reader.ReadUTFArray("stringArray");
 }
Пример #8
0
 public void ReadPortable(IPortableReader reader)
 {
     _username = reader.ReadUTF("username");
     _age      = reader.ReadInt("age");
     _active   = reader.ReadBoolean("active");
 }
 public void ReadPortable(IPortableReader reader)
 {
     Id = reader.ReadInt("id");
     Name = reader.ReadUTF("name");
     LastOrder = DateTime.FromFileTimeUtc(reader.ReadLong("lastOrder"));
 }
Пример #10
0
 /** <inheritDoc /> */
 public void ReadPortable(IPortableReader reader)
 {
     A = reader.ReadInt("a");
     B = reader.RawReader().ReadString();
 }
Пример #11
0
            /** <inheritdoc /> */
            public void ReadPortable(IPortableReader reader)
            {
                TestProperty = reader.ReadInt("TestProp");

                throw new Exception("Expected exception");
            }
Пример #12
0
 public virtual void ReadPortable(IPortableReader reader)
 {
     k    = reader.ReadInt("myint");
     name = reader.ReadUTF("name");
 }
Пример #13
0
 public void ReadPortable(IPortableReader reader)
 {
     Id        = reader.ReadInt("id");
     Name      = reader.ReadUTF("name");
     LastOrder = DateTime.FromFileTimeUtc(reader.ReadLong("lastOrder"));
 }
 /** <inheritDoc /> */
 public void ReadPortable(IPortableReader reader)
 {
     A = reader.ReadInt("a");
     B = reader.RawReader().ReadInt();
 }
 public void ReadPortable(IPortableReader reader)
 {
     b = reader.ReadByte("b");
     bo = reader.ReadBoolean("bool");
     c = reader.ReadChar("c");
     s = reader.ReadShort("s");
     i = reader.ReadInt("i");
     l = reader.ReadLong("l");
     f = reader.ReadFloat("f");
     d = reader.ReadDouble("d");
     str = reader.ReadUTF("str");
     p = reader.ReadPortable<InnerPortable>("p");
 }
Пример #16
0
        public void ReadPortable(IPortableReader reader)
        {
            model_body = reader.ReadUTF("f0");
            model_engine_position = reader.ReadUTF("f1");
            model_engine_cc = reader.ReadInt("f2");
            model_engine_cyl = reader.ReadInt("f3");
            model_engine_type = reader.ReadUTF("f4");

            model_engine_valves_per_cyl = reader.ReadInt("f5");
            model_engine_power_ps = reader.ReadInt("f6");
            model_engine_power_rpm = reader.ReadInt("f7");
            model_engine_torque_nm = reader.ReadInt("f8");
            model_engine_torque_rpm = reader.ReadInt("f9");
            model_engine_bore_mm = reader.ReadInt("f10");
            model_engine_stroke_mm = reader.ReadInt("f11");
            model_engine_compression = reader.ReadUTF("f12");
            model_engine_fuel = reader.ReadUTF("f13");

            model_top_speed_kph = reader.ReadInt("f14");
            model_0_to_100_kph = reader.ReadFloat("f15");
            model_drive = reader.ReadUTF("f16");
            model_transmission_type = reader.ReadUTF("f17");
            model_seats = reader.ReadInt("f18");
            model_doors = reader.ReadInt("f19");
            model_weight_kg = reader.ReadInt("f20");
            model_length_mm = reader.ReadInt("f21");
            model_height_mm = reader.ReadInt("f22");
            model_width_mm = reader.ReadInt("f23");
            model_wheelbase_mm = reader.ReadInt("f24");

            model_lkm_hwy = reader.ReadFloat("f25");
            model_lkm_mixed = reader.ReadFloat("f26");
            model_lkm_city = reader.ReadFloat("f27");
            model_fuel_cap_l = reader.ReadInt("f28");
            model_sold_in_us = reader.ReadBoolean("f29");
            model_co2 = reader.ReadFloat("f30");
            model_make_display = reader.ReadUTF("f31");
            make_display = reader.ReadUTF("f32");
            make_country = reader.ReadUTF("f33");
        }
 public override void ReadPortable(IPortableReader reader)
 {
     base.ReadPortable(reader);
     v = reader.ReadInt("v");
 }
            public unsafe void ReadPortable(object obj, IPortableReader reader)
            {
                PrimitiveFieldType obj0 = (PrimitiveFieldType)obj;

                obj0.PBool = reader.ReadBoolean("bool");
                obj0.PByte = reader.ReadByte("byte");
                obj0.PShort = reader.ReadShort("short");
                obj0.PInt = reader.ReadInt("int");

                obj0.PLong = reader.ReadLong("long");
                obj0.PChar = reader.ReadChar("char");
                obj0.PFloat = reader.ReadFloat("float");
                obj0.PDouble = reader.ReadDouble("double");

                byte sByte = reader.ReadByte("sbyte");
                short uShort = reader.ReadShort("ushort");
                int uInt = reader.ReadInt("uint");
                long uLong = reader.ReadLong("ulong");

                obj0.PSbyte = *(sbyte*)&sByte;
                obj0.PUshort = *(ushort*)&uShort;
                obj0.PUint = *(uint*)&uInt;
                obj0.PUlong = *(ulong*)&uLong;

                obj0.PString = reader.ReadString("string");
                obj0.PGuid = reader.ReadGuid("guid").Value;
                obj0.PnGuid = reader.ReadGuid("nguid");
            }
            public unsafe void ReadPortable(IPortableReader reader)
            {
                PBool = reader.ReadBoolean("bool");
                PByte = reader.ReadByte("byte");
                PShort = reader.ReadShort("short");
                PInt = reader.ReadInt("int");

                PLong = reader.ReadLong("long");
                PChar = reader.ReadChar("char");
                PFloat = reader.ReadFloat("float");
                PDouble = reader.ReadDouble("double");

                byte sByte = reader.ReadByte("sbyte");
                short uShort = reader.ReadShort("ushort");
                int uInt = reader.ReadInt("uint");
                long uLong = reader.ReadLong("ulong");

                PSbyte = *(sbyte*)&sByte;
                PUshort = *(ushort*)&uShort;
                PUint = *(uint*)&uInt;
                PUlong = *(ulong*)&uLong;

                PString = reader.ReadString("string");
                PGuid = reader.ReadGuid("guid").Value;
                PnGuid = reader.ReadGuid("nguid");
            }
 public virtual void ReadPortable(IPortableReader reader)
 {
     k = reader.ReadInt("myint");
     name = reader.ReadUTF("name");
 }
 /// <exception cref="System.IO.IOException" />
 public virtual void ReadPortable(IPortableReader reader)
 {
     street = reader.ReadString("street");
     no     = reader.ReadInt("no");
 }
Пример #22
0
 /** <inheritdoc /> */
 public void ReadPortable(IPortableReader reader)
 {
     TestProperty = reader.ReadInt("TestProp");
     
     throw new Exception("Expected exception");
 }
Пример #23
0
 /** <ineritdoc /> */
 public void ReadPortable(IPortableReader reader)
 {
     Name = reader.ReadString("name");
     Address = reader.ReadString("address");
     Age = reader.ReadInt("age");
 }
 /// <exception cref="System.IO.IOException" />
 public virtual void ReadPortable(IPortableReader reader)
 {
     name = reader.ReadUTF("name");
     address = reader.ReadPortable<PortableAddress>("address");
     height = reader.ReadLong("height");
     age = reader.ReadInt("age");
 }
Пример #25
0
 /** <ineritdoc /> */
 public void ReadPortable(IPortableReader reader)
 {
     Name    = reader.ReadString("name");
     Address = reader.ReadString("address");
     Age     = reader.ReadInt("age");
 }
Пример #26
0
 /** <inheritdoc /> */
 public void ReadPortable(IPortableReader reader)
 {
     TestProperty = reader.ReadInt("TestProp");
 }
 /// <exception cref="System.IO.IOException" />
 public virtual void ReadPortable(IPortableReader reader)
 {
     street = reader.ReadUTF("street");
     no = reader.ReadInt("no");
 }
 public void ReadPortable(IPortableReader reader)
 {
     Bool = reader.ReadBoolean("bool");
     BoolArray = reader.ReadBooleanArray("boolArray");
     Byte = reader.ReadByte("byte");
     ByteArray = reader.ReadByteArray("byteArray");
     Char = reader.ReadChar("char");
     CharArray = reader.ReadCharArray("charArray");
     Short = reader.ReadShort("short");
     ShortArray = reader.ReadShortArray("shortArray");
     Int = reader.ReadInt("int");
     IntArray = reader.ReadIntArray("intArray");
     Long = reader.ReadLong("long");
     LongArray = reader.ReadLongArray("longArray");
     Float = reader.ReadFloat("float");
     FloatArray = reader.ReadFloatArray("floatArray");
     Double = reader.ReadDouble("double");
     DoubleArray = reader.ReadDoubleArray("doubleArray");
     String = reader.ReadUTF("string");
     StringArray = reader.ReadUTFArray("stringArray");
 }
Пример #29
0
 public override void ReadPortable(IPortableReader reader)
 {
     base.ReadPortable(reader);
     v = reader.ReadInt("v");
 }
Пример #30
0
 /** <inheritdoc /> */
 public void ReadPortable(IPortableReader reader)
 {
     TestProperty = reader.ReadInt("TestProp");
 }