public override bool TryConvert(string self, out LinkedList <T> result)
        {
            ListStringConverter <T> c = Get(typeof(List <T>)) as ListStringConverter <T>;
            List <T> list;

            if (!c.TryConvert(self, out list))
            {
                result = MakeDefault();
                return(false);
            }
            else
            {
                result = new LinkedList <T>(list);
                return(true);
            }
        }
예제 #2
0
        public override bool TryConvert(string self, out Dictionary <Key, Value> result)
        {
            dic.Clear();
            bool bo = ListStringConverter <Key> .ReadArray(self, (inner) =>
            {
                if (inner.EndsWith(dot.ToString()))
                {
                    inner = inner.Remove(inner.Length - 1, 1);
                }
                Read(inner, dic);
            });

            if (bo)
            {
                result = new Dictionary <Key, Value>(dic);
            }
            else
            {
                result = MakeDefault();
            }
            return(bo);
        }
        public override string ConvertToString(LinkedList <T> t)
        {
            ListStringConverter <T> c = Get(typeof(List <T>)) as ListStringConverter <T>;

            return(c.ConvertToString(t.ToList()));
        }