Esempio n. 1
0
        public static void DecodeInto(this string data, out Dictionary <int, string> dic)
        {
            var cody = new StdDecoder(data);

            dic = new Dictionary <int, string>();

            while (cody.GotData)
            {
                dic.Add(cody.GetTag().ToInt(), cody.GetData());
            }
        }
Esempio n. 2
0
        // ToListOfSTD
        public static bool TryDecodeInto <T>(this string data, List <T> val)
        {
            if (val != null)
            {
                var cody = new StdDecoder(data);

                while (cody.GotData)
                {
                    var ind = cody.GetTag().ToIntFromTextSafe(-1);
                    cody.GetData().TryDecodeInto(val.TryGet(ind));
                }
                return(true);
            }
            return(false);
        }
Esempio n. 3
0
        public static List <List <T> > DecodeInto <T>(this string data, out List <List <T> > l) where T : ISTD, new()
        {
            l = new List <List <T> >();

            var cody = new StdDecoder(data);

            while (cody.GotData)
            {
                cody.GetTag();
                List <T> el;
                cody.GetData().DecodeInto(out el);
                l.Add(el);
            }

            return(l);
        }