/// <summary> /// Adds the response headers. /// </summary> /// <param name="hasOptions">The has options.</param> /// <param name="responseHeaders">The response headers.</param> private void AddResponseHeaders(IHasOptions hasOptions, IDictionary <string, string> responseHeaders) { foreach (var item in responseHeaders) { hasOptions.Options[item.Key] = item.Value; } }
/// <summary> /// Adds the response headers. /// </summary> /// <param name="hasOptions">The has options.</param> /// <param name="responseHeaders">The response headers.</param> private void AddResponseHeaders(IHasOptions hasOptions, IEnumerable <KeyValuePair <string, string> > responseHeaders) { foreach (var item in responseHeaders) { hasOptions.Options[item.Key] = item.Value; } }
public static TValue GetOption <TValue>(this IHasOptions hasOptions, Symbol key) // ReSharper disable once HeapView.BoxingAllocation => (TValue)(hasOptions.GetOption(key) ?? default(TValue) !);