Beispiel #1
0
 /// <summary>
 /// Serializes record
 /// </summary>
 public readonly void Serialize(IRecordFieldSerializer serializer)
 {
     serializer.Write(nameof(Pos), Pos);
     serializer.Write(nameof(Value), Value);
     serializer.Write(nameof(Price), Price);
     serializer.Write(nameof(Gross), Gross);
     serializer.Write(nameof(Description), Description);
     serializer.CollectionField <int>().Write(nameof(Values), Values);
     serializer.CollectionField <TestSubValueRecord>().Write(nameof(References), References);
 }
 public void Serialize(IRecordFieldSerializer serializer, TestReferenceRecord record)
 {
     serializer.Write(nameof(ByteValue), record.ByteValue);
     serializer.Write(nameof(SbyteValue), record.SbyteValue);
     serializer.Write(nameof(UShortValue), record.UShortValue);
     serializer.Write(nameof(ShortValue), record.ShortValue);
     serializer.Write(nameof(UIntValue), record.UIntValue);
     serializer.Write(nameof(IntValue), record.IntValue);
     serializer.Write(nameof(ULongValue), record.ULongValue);
     serializer.Write(nameof(LongValue), record.LongValue);
     serializer.Write(nameof(StringValue), record.StringValue);
     serializer.Write(nameof(DoubleValue), record.DoubleValue);
     serializer.WriteValueField(nameof(NumberValue), record.NumberValue);
     serializer.WriteReferenceField(nameof(NumberArray), record.NumberArray);
 }
 public void Serialize(IRecordFieldSerializer serializer, TestSubReferenceRecord?record)
 {
     serializer.Write(nameof(Value), record?.Value);
 }