public Tlv Add(Tlv tlv) { var tlvs = default(List <Tlv>); if (this.Tlvs.TryGetValue(tlv.Type, out tlvs)) { tlvs.Add(tlv); } else { this.Tlvs.Add(tlv.Type, new List <Tlv> { tlv }); } return(tlv); }
public Tlv Add(Tlv tlv) { ValidateMetaType(MetaType.Group); var tlvs = default(List <Tlv>); if (this.Tlvs.TryGetValue(tlv.Type, out tlvs)) { tlvs.Add(tlv); } else { this.Tlvs.Add(tlv.Type, new List <Tlv> { tlv }); } return(tlv); }