public void Write(BinaryWriter bw, TGIsequence sequence) { if (sequence == TGIsequence.TGI) { bw.Write(this.type); bw.Write(this.group); bw.Write(this.instance); } if (sequence == TGIsequence.IGT) { bw.Write(this.instance); bw.Write(this.group); bw.Write(this.type); } if (sequence == TGIsequence.ITG) { bw.Write(this.instance); bw.Write(this.type); bw.Write(this.group); } }
public TGI(BinaryReader br, TGIsequence sequence) { if (sequence == TGIsequence.TGI) { this.type = br.ReadUInt32(); this.group = br.ReadUInt32(); this.instance = br.ReadUInt64(); } if (sequence == TGIsequence.IGT) { this.instance = br.ReadUInt64(); this.group = br.ReadUInt32(); this.type = br.ReadUInt32(); } if (sequence == TGIsequence.ITG) { this.instance = br.ReadUInt64(); this.type = br.ReadUInt32(); this.group = br.ReadUInt32(); } }