Ejemplo n.º 1
0
 private static NameValueCollection FaultIn(ref NameValueCollection collection)
 {
     if (collection == null)
     {
         collection = new HttpValuesCollection();
     }
     return(collection);
 }
Ejemplo n.º 2
0
        private NameValueCollection CopyCollection(HttpCookieCollection cookies)
        {
            if (cookies == null || cookies.Count == 0)
            {
                return(null);
            }

            NameValueCollection copy = new HttpValuesCollection(cookies.Count);

            for (int i = 0; i < cookies.Count; i++)
            {
                HttpCookie cookie = cookies[i];
                // NOTE: We drop the Path and Domain properties of the cookie for sake of simplicity.
                copy.Add(cookie.Name, cookie.Value);
            }

            return(copy);
        }
Ejemplo n.º 3
0
        private NameValueCollection CopyCollection(HttpCookieCollection cookies)
        {
            if (cookies == null || cookies.Count == 0) return null;

            NameValueCollection copy = new HttpValuesCollection(cookies.Count);
            for (int i = 0; i < cookies.Count; i++)
            {
                HttpCookie cookie = cookies[i];
                // NOTE: We drop the Path and Domain properties of the cookie for sake of simplicity.
                copy.Add(cookie.Name, cookie.Value);
            }

            return copy;
        }
Ejemplo n.º 4
0
 private static NameValueCollection FaultIn(ref NameValueCollection collection)
 {
     if (collection == null) collection = new HttpValuesCollection();
     return collection;
 }