namespace Tester.MiscSyntax
{
// An abstract property
///
/// A block of data in a packet. Packets are composed of one or more blocks,
/// each block containing one or more fields
///
public abstract class PacketBlock
{
/// Current length of the data in this packet
public abstract int Length { get; }
///
/// Create a block from a byte array
///
/// Byte array containing the serialized block
/// Starting position of the block in the byte array.
/// This will point to the data after the end of the block when the
/// call returns
public abstract void FromBytes(byte[] bytes, ref int i);
///
/// Serialize this block into a byte array
///
/// Byte array to serialize this block into
/// Starting position in the byte array to serialize to.
/// This will point to the position directly after the end of the
/// serialized block when the call returns
public abstract void ToBytes(byte[] bytes, ref int i);
}
}