Example #1
0
        private TLVItem(TLVTag tag, List <byte> data = null, List <TLVItem> subItems = null)
        {
            Tag = tag;

            Data = new List <byte>();
            if (data != null)
            {
                Data.AddRange(data);
            }

            SubItems = new List <TLVItem>();
            if (subItems != null)
            {
                SubItems.AddRange(subItems);
            }
        }
Example #2
0
 public TLVItem(TLVTag tag, List <byte> data) : this(tag, data, null)
 {
 }
Example #3
0
 public TLVItem(TLVTag tag, List <TLVItem> subItems = null) : this(tag, null, subItems)
 {
 }
Example #4
0
        internal static TLVType GetTypeTLV(TLVTag tag)
        {
            TLVTagInfoAttribute tLV = TLVAttribute.GetCustomAttribute(typeof(TLVTag).GetField(tag.ToString()), typeof(TLVTagInfoAttribute)) as TLVTagInfoAttribute;

            return(tLV?.TlvType ?? TLVType.Auto);
        }