12345678910111213141516171819202122232425262728293031 |
- namespace InABox.DigitalMatter
- {
- public class DMOperatorField : DMField
- {
- public DMOperatorField()
- {
- Data = new byte[] { };
- }
- public override byte Type => 0x03;
- public byte[] Data { get; set; }
- protected override void DoDecode(IDMReadBuffer buffer)
- {
- int type = buffer.TakeByte();
- Data = buffer.TakeBytes(buffer.BufferSize - 1);
- }
- protected override void DoEncode(IDMWriteBuffer buffer)
- {
- buffer.AddByte(Type);
- buffer.AddBytes(Data);
- }
- public override bool IsValid()
- {
- return true;
- }
- }
- }
|