Exemplo n.º 1
0
        public static TLVList DeserializeChildrenWithNoLV(byte[] rawTlv, int pos)
        {
            TLVList children = new TLVList();

            for (int i = pos; i < rawTlv.Length;)
            {
                T t = T.Create(rawTlv, ref i);
                children.AddToList(TLV.Create(t.TagLable));
            }
            return(children);
        }
Exemplo n.º 2
0
        private static TLVList DeserList(List <TLVXML> serXML)
        {
            TLVList result = new TLVList();

            serXML.ForEach((x) =>
            {
                TLV tlvToAdd = TLV.Create(x.Tag);
                result.AddToList(tlvToAdd);
                if (x.Children.Count > 0)
                {
                    tlvToAdd.Children.AddListToList(DeserList(x.Children));
                }
                else
                if (x.Value != null)
                {
                    tlvToAdd.Value = x.Value;
                }
            });
            return(result);
        }