Parse() public static method

public static Parse ( string value ) : List
value string
return List
Ejemplo n.º 1
0
        public static TLV parse(string testData)
        {
            TLV        result = null;
            List <TLV> val    = APDU.Parse(testData);

            if (val == null)
            {
                return(null);
            }
            if (val.Count > 0)
            {
                result = val.First();
                List <TLV> childs = APDU.Parse(result.Value);
                if (childs != null && childs.Count > 0)
                {
                    foreach (var child in childs)
                    {
                        TLV gg = TLV.parse(child.Value);
                        if (gg != null)
                        {
                            child.addChild(gg);
                        }
                        result.addChild(child);
                    }
                }
            }
            else
            {
                result = null;
            }
            return(result);
        }
Ejemplo n.º 2
0
        public void ParseAPDU(string val)
        {
            APDU apdu = new APDU();

            val         = StringManipulator.removeSpace(val);
            internalTLV = APDU.Parse(val);
        }
Ejemplo n.º 3
0
        public static List <TLV> ParseMultipleTLV(string value)
        {
            List <TLV> result = APDU.Parse(value);

            foreach (var item in result)
            {
                item.addChild(TLV.parse(item.Value));
            }

            return(result);
        }