private void WriteTdfUnion(TdfUnion tdf) { // write active member _stream.WriteByte((byte)tdf.activeMember); if (tdf.activeMember != NetworkAddressMember.Unset) { tdf.Data.ForEach(delegate(Tdf item) { WriteTdf(item); }); } }
private TdfUnion DecodeTdfUnion(string label) { NetworkAddressMember activeMember = (NetworkAddressMember)_stream.ReadByte(); TdfUnion union = new TdfUnion(label, activeMember, new List <Tdf> { }); // if active member is not set then there are no data members if (activeMember != NetworkAddressMember.Unset) { union.Data.Add(ReadTdf()); } return(union); }
private void WriteTdfUnion(TdfUnion tdf) { // write active member _stream.WriteByte((byte)tdf.activeMember); if (tdf.activeMember != NetworkAddressMember.Unset) { tdf.Data.ForEach(delegate (Tdf item) { WriteTdf(item); }); } }
private TdfUnion DecodeTdfUnion(string label) { NetworkAddressMember activeMember = (NetworkAddressMember)_stream.ReadByte(); TdfUnion union = new TdfUnion(label, activeMember, new List<Tdf> { }); // if active member is not set then there are no data members if (activeMember != NetworkAddressMember.Unset) { union.Data.Add(ReadTdf()); } return union; }