Esempio n. 1
0
 public static int GetHeaderFieldList(int startFrom, IList source, HeaderFieldList fieldList)
 {
     if (source == null)
     {
         return(startFrom);
     }
     for (int i = startFrom; i < source.Count; i++)
     {
         string str = (string)source[i];
         if (StringUtils.IsEmpty(str))
         {
             return(i);
         }
         if ((str[0] != '\t') && (str[0] != ' '))
         {
             int index = str.IndexOf(":");
             if (index >= 0)
             {
                 fieldList.Add(str.Substring(0, index), i.ToString(CultureInfo.InvariantCulture));
             }
         }
     }
     return(source.Count);
 }