/// <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;
     }
 }
Esempio n. 2
0
 /// <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;
     }
 }
Esempio n. 3
0
 public static TValue GetOption <TValue>(this IHasOptions hasOptions, Symbol key)
 // ReSharper disable once HeapView.BoxingAllocation
 => (TValue)(hasOptions.GetOption(key) ?? default(TValue) !);