private static NameValueCollection FaultIn(ref NameValueCollection collection) { if (collection == null) { collection = new HttpValuesCollection(); } return(collection); }
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); }
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; }
private static NameValueCollection FaultIn(ref NameValueCollection collection) { if (collection == null) { collection = new HttpValuesCollection(); } return collection; }