Esempio n. 1
0
 /// <summary>
 /// Encode a field by writing the property value into the writer.
 /// </summary>
 /// <param name="writer">The writer that will contain the encoded data.</param>
 /// <param name="record">The object whose property will be encoded.</param>
 /// <param name="property">The information abou the property to be encoded.</param>
 public abstract void EncodeField(BinaryWriter writer, Record record, PropertyInfo property);
Esempio n. 2
0
 /// <summary>
 /// Gets the total size of this field when it's encoded.
 /// </summary>
 /// <returns>An integer that represents the number of bytes that will be used once it is encoded.</returns>
 public virtual int DataSize(Record record, PropertyInfo property)
 {
     return(Size);
 }
Esempio n. 3
0
 /// <summary>
 /// Decode a field from a reader into the specified property.
 /// </summary>
 /// <param name="reader">The reader we will be reading from.</param>
 /// <param name="record">The object whose property will be set.</param>
 /// <param name="property">The information about the property to be set.</param>
 public abstract void DecodeField(BinaryReader reader, Record record, PropertyInfo property);