Ejemplo n.º 1
0
        /// <summary>
        /// Copies an array of header models to a header dictionary.
        /// </summary>
        /// <param name="models">The source header models.</param>
        /// <param name="dict">The target header dictionary.</param>
        private void CopyHeaderModelToDictionary(IEnumerable <HeaderModel> models, IHttpHeaders dict)
        {
            dict.Clear();

            foreach (var model in models)
            {
                dict[model.Name] = model.Value;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Copies an array of header models to a header dictionary.
        /// </summary>
        /// <param name="models">The source header models.</param>
        /// <param name="dict">The target header dictionary.</param>
        private void CopyHeaderModelToDictionary(IEnumerable<HeaderModel> models, IHttpHeaders dict)
        {
            dict.Clear();

            foreach (var model in models)
            {
                dict[model.Name] = model.Value;
            }
        }