Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }