internal static void CopyTo(this HttpResponseHeaders from, HttpResponseHeaders to) { foreach (var header in from) { to.TryAddWithoutValidation(header.Key, header.Value); } }
public static void CopyTo(this HttpResponseHeaders fromHeaders, HttpResponseHeaders toHeaders) { Contract.Assert(fromHeaders != null, "fromHeaders cannot be null."); Contract.Assert(toHeaders != null, "toHeaders cannot be null."); foreach (KeyValuePair<string, IEnumerable<string>> header in fromHeaders) { toHeaders.TryAddWithoutValidation(header.Key, header.Value); } }