コード例 #1
0
 internal static void CopyTo(this HttpRequestHeaders from, HttpRequestHeaders to)
 {
     foreach (var header in from)
     {
         to.TryAddWithoutValidation(header.Key, header.Value);
     }
 }
コード例 #2
0
        public static void CopyTo(this HttpRequestHeaders fromHeaders, HttpRequestHeaders 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);
            }
        }