/// <exception cref="System.IO.IOException" />
 public virtual void WritePortable(IPortableWriter writer)
 {
     writer.WriteLong("height", height);
     writer.WriteInt("age", age);
     writer.WriteString("name", name);
     writer.WritePortable("address", address);
 }
Example #2
0
            /** <inheritdoc /> */
            public void WritePortable(IPortableWriter writer)
            {
                writer.WriteString("Prop", Prop);
                writer.WriteBoolean("ThrowOnRead", ThrowOnRead);

                if (ThrowOnWrite)
                {
                    throw new Exception("Expected exception in TestPortableClass.WritePortable");
                }
            }
Example #3
0
 /// <exception cref="System.IO.IOException"/>
 public virtual void WritePortable(IPortableWriter writer)
 {
     writer.WriteByte("byte", aByte);
     writer.WriteBoolean("boolean", aBoolean);
     writer.WriteChar("char", character);
     writer.WriteShort("short", aShort);
     writer.WriteInt("int", integer);
     writer.WriteLong("long", aLong);
     writer.WriteFloat("float", aFloat);
     writer.WriteDouble("double", aDouble);
     writer.WriteString("string", aString);
 }
Example #4
0
 public void WritePortable(IPortableWriter writer)
 {
     writer.WriteByte("b", b);
     writer.WriteBoolean("bool", bo);
     writer.WriteChar("c", c);
     writer.WriteShort("s", s);
     writer.WriteInt("i", i);
     writer.WriteLong("l", l);
     writer.WriteFloat("f", f);
     writer.WriteDouble("d", d);
     writer.WriteString("str", str);
     if (p != null)
     {
         writer.WritePortable("p", p);
     }
     else
     {
         writer.WriteNullPortable("p", SerializationTestsConstants.PORTABLE_FACTORY_ID,
                                  SerializationTestsConstants.INNER_PORTABLE);
     }
 }
Example #5
0
 public void WritePortable(IPortableWriter writer)
 {
     writer.WriteBoolean("bool", Bool);
     writer.WriteBooleanArray("boolArray", BoolArray);
     writer.WriteByte("byte", Byte);
     writer.WriteByteArray("byteArray", ByteArray);
     writer.WriteChar("char", Char);
     writer.WriteCharArray("charArray", CharArray);
     writer.WriteShort("short", Short);
     writer.WriteShortArray("shortArray", ShortArray);
     writer.WriteInt("int", Int);
     writer.WriteIntArray("intArray", IntArray);
     writer.WriteLong("long", Long);
     writer.WriteLongArray("longArray", LongArray);
     writer.WriteFloat("float", Float);
     writer.WriteFloatArray("floatArray", FloatArray);
     writer.WriteDouble("double", Double);
     writer.WriteDoubleArray("doubleArray", DoubleArray);
     writer.WriteString("string", String);
     writer.WriteStringArray("stringArray", StringArray);
 }
 /// <exception cref="System.IO.IOException" />
 public virtual void WritePortable(IPortableWriter writer)
 {
     writer.WriteInt("no", no);
     writer.WriteString("street", street);
 }
Example #7
0
 public void WritePortable(IPortableWriter writer)
 {
     writer.WriteString("shortString", shortString);
 }
            /** <inheritdoc /> */
            override public void WritePortable(IPortableWriter writer)
            {
                PortableWriterImpl writer0 = (PortableWriterImpl)writer;

                writer.WriteString("before", Before);

                writer0.DetachNext();
                writer.WriteObject("inner", Inner);

                writer.WriteString("after", After);

                IPortableRawWriter rawWriter = writer.RawWriter();

                rawWriter.WriteString(RawBefore);

                writer0.DetachNext();
                rawWriter.WriteObject(RawInner);

                rawWriter.WriteString(RawAfter);
            }
            /** <inheritdoc /> */
            virtual public void WritePortable(IPortableWriter writer)
            {
                writer.WriteString("before", Before);
                writer.WriteObject("outer", Outer);
                writer.WriteString("after", After);

                IPortableRawWriter rawWriter = writer.RawWriter();

                rawWriter.WriteString(RawBefore);
                rawWriter.WriteObject(RawOuter);
                rawWriter.WriteString(RawAfter);
            }
 /** <ineritdoc /> */
 public void WritePortable(IPortableWriter writer)
 {
     writer.WriteString("name", Name);
     writer.WriteString("address", Address);
     writer.WriteInt("age", Age);
 }
            public unsafe void WritePortable(IPortableWriter writer)
            {
                writer.WriteBoolean("bool", PBool);
                writer.WriteByte("byte", PByte);
                writer.WriteShort("short", PShort);
                writer.WriteInt("int", PInt);
                writer.WriteLong("long", PLong);
                writer.WriteChar("char", PChar);
                writer.WriteFloat("float", PFloat);
                writer.WriteDouble("double", PDouble);

                sbyte sByte = PSbyte;
                ushort uShort = PUshort;
                uint uInt = PUint;
                ulong uLong = PUlong;

                writer.WriteByte("sbyte", *(byte*)&sByte);
                writer.WriteShort("ushort", *(short*)&uShort);
                writer.WriteInt("uint", *(int*)&uInt);
                writer.WriteLong("ulong", *(long*)&uLong);

                writer.WriteString("string", PString);
                writer.WriteGuid("guid", PGuid);
                writer.WriteGuid("nguid", PnGuid);
            }
 public virtual void WritePortable(IPortableWriter writer)
 {
     writer.WriteString("name", name);
     writer.WriteInt("myint", k);
 }
 public void WritePortable(IPortableWriter writer)
 {
     writer.WriteInt("id", Id);
     writer.WriteString("name", Name);
     writer.WriteLong("lastOrder", LastOrder.ToFileTimeUtc());
 }
 public void WritePortable(IPortableWriter writer)
 {
     writer.WriteString("name", _name);
 }
            public unsafe void WritePortable(object obj, IPortableWriter writer)
            {
                PrimitiveFieldType obj0 = (PrimitiveFieldType)obj;

                writer.WriteBoolean("bool", obj0.PBool);
                writer.WriteByte("byte", obj0.PByte);
                writer.WriteShort("short", obj0.PShort);
                writer.WriteInt("int", obj0.PInt);
                writer.WriteLong("long", obj0.PLong);
                writer.WriteChar("char", obj0.PChar);
                writer.WriteFloat("float", obj0.PFloat);
                writer.WriteDouble("double", obj0.PDouble);

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

                writer.WriteByte("sbyte", *(byte*)&sByte);
                writer.WriteShort("ushort", *(short*)&uShort);
                writer.WriteInt("uint", *(int*)&uInt);
                writer.WriteLong("ulong", *(long*)&uLong);

                writer.WriteString("string", obj0.PString);
                writer.WriteGuid("guid", obj0.PGuid);
                writer.WriteGuid("nguid", obj0.PnGuid);
            }
Example #16
0
 /** <ineritdoc /> */
 public void WritePortable(IPortableWriter writer)
 {
     writer.WriteString("name", Name);
     writer.WriteString("address", Address);
     writer.WriteInt("age", Age);
 }
Example #17
0
 public void WritePortable(IPortableWriter writer)
 {
     writer.WriteString("username", _username);
     writer.WriteInt("age", _age);
     writer.WriteBoolean("active", _active);
 }