Exemplo n.º 1
0
 protected T[] ParseArr <T>(string value)
 {
     T[] item;
     if (StrHelper.GetArr(value, StrHelper.ArrSplitLv2, out item, ParseAny <T>))
     {
         return(item);
     }
     return(new T[0]);
 }
Exemplo n.º 2
0
        protected SerializableArr <T> ParseSerializableArr <T>(string value)
        {
            var result = new SerializableArr <T>();

            if (!StrHelper.GetArr(value, StrHelper.ArrSplitLv2, out result.Data, ParseAny <T>))
            {
                result.Data = new T[0];
            }
            return(result);
        }
Exemplo n.º 3
0
        protected bool GetArr <TItem>(string key, string sprartor, out TItem[] value, Func <string, TItem> parse)
        {
            string strValue;

            if (!GetString(key, out strValue))
            {
                value = default(TItem[]);
                return(false);
            }

            return(StrHelper.GetArr(strValue, sprartor, out value, parse));
        }