Table of Contents

AddRange Method

Definition

AddRange(IDecorator<IHeaderDictionary>, IHeaderDictionary, Func<KeyValuePair<string, StringValues>, IHeaderDictionary, bool>)

Adds a range of headers to the enclosed IHeaderDictionary.

public static IHeaderDictionary AddRange(this IDecorator<IHeaderDictionary> decorator, IHeaderDictionary headers, Func<KeyValuePair<string, StringValues>, IHeaderDictionary, bool> predicate = null)

Parameters

decorator IDecorator<IHeaderDictionary>

The IDecorator<T> to extend.

headers IHeaderDictionary

The IHeaderDictionary to populate.

predicate Func<KeyValuePair<string, StringValues>, IHeaderDictionary, bool>

The function delegate that specifies what elements to populate from headers. Default is only non-existing headers.

Returns

IHeaderDictionary

A reference to decorator.Inner.Inner so that additional calls can be chained.

Remarks

When predicate is null, only new headers are added to the enclosed IHeaderDictionary.