Exemple #1
0
        private HeaderValue Find(string name)
        {
            HeaderType  type = HeaderTypeFactory.Find(name);
            HeaderValue value;

            if (mValues.TryGetValue(type.ID, out value))
            {
                return(value);
            }
            value            = new HeaderValue(type, null);
            mValues[type.ID] = value;
            return(value);
        }
Exemple #2
0
 public string this[string name]
 {
     get
     {
         HeaderValue headerValue = FindOnly(name);
         if (headerValue != null)
         {
             return(headerValue.Value);
         }
         else
         {
             return(null);
         }
     }
     set
     {
         Find(name).Value = value;
     }
 }
Exemple #3
0
        private HeaderValue Find(string name)
        {
            HeaderValue result;

            for (int i = 0; i < mValues.Count; i++)
            {
                result = mValues[i];
                if (result.Type.Compare(name))
                {
                    return(result);
                }
            }
            HeaderType type = HeaderTypeFactory.Find(name);

            if (type == null)
            {
                type = new HeaderType(name);
            }
            result = new HeaderValue(type, null);
            mValues.Add(result);
            return(result);
        }
Exemple #4
0
 public string this[string name]
 {
     get
     {
         HeaderValue headerValue = FindOnly(name);
         if (headerValue != null)
         {
             return(headerValue.Value);
         }
         else
         {
             return(null);
         }
     }
     set
     {
         if (string.IsNullOrEmpty(name))
         {
             return;
         }
         Find(name).Value = value;
     }
 }