public byte[] GetBytes() { AtrWriteStream AtrStream = new AtrWriteStream(); AtrStream.WriteBytes(this.Preamble.Bytes); this.InterfaceByteGroups.ForEach(_ => AtrStream.WriteBytes(_.Bytes)); AtrStream.WriteBytes(this.HistoricalCharacters.Bytes); if (this.ChecksumRequired) { AtrStream.WriteBytes(this.AtrChecksum.Bytes); } return(AtrStream.ToByteArray()); }
internal void NotifyChanged() { if (this.ChecksumRequired) { AtrWriteStream AtrStream = new AtrWriteStream(); AtrStream.WriteBytes(this.Preamble.Bytes); this.InterfaceByteGroups.ForEach(_ => AtrStream.WriteBytes(_.Bytes)); AtrStream.WriteBytes(this.HistoricalCharacters.Bytes); this.AtrChecksum = new AtrChecksumToken(AtrStream.ToByteArray()); } else { this.AtrChecksum = null; } this.owner.NotifyChanged(); }