React to IHeaderDictionary changes.
This commit is contained in:
parent
5a1c120392
commit
6e347724b5
|
|
@ -271,6 +271,40 @@ namespace Microsoft.AspNet.Mvc.TagHelpers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void AddStringCollectionKey(
|
||||||
|
StringBuilder builder,
|
||||||
|
string keyName,
|
||||||
|
string value,
|
||||||
|
IHeaderDictionary sourceCollection)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(value))
|
||||||
|
{
|
||||||
|
// keyName(param1=value1|param2=value2)
|
||||||
|
builder.Append(CacheKeyTokenSeparator)
|
||||||
|
.Append(keyName)
|
||||||
|
.Append("(");
|
||||||
|
|
||||||
|
var tokenFound = false;
|
||||||
|
foreach (var item in Tokenize(value))
|
||||||
|
{
|
||||||
|
tokenFound = true;
|
||||||
|
|
||||||
|
builder.Append(item)
|
||||||
|
.Append(CacheKeyTokenSeparator)
|
||||||
|
.Append(sourceCollection[item])
|
||||||
|
.Append(CacheKeyTokenSeparator);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tokenFound)
|
||||||
|
{
|
||||||
|
// Remove the trailing separator
|
||||||
|
builder.Length -= CacheKeyTokenSeparator.Length;
|
||||||
|
}
|
||||||
|
|
||||||
|
builder.Append(")");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void AddVaryByRouteKey(StringBuilder builder)
|
private void AddVaryByRouteKey(StringBuilder builder)
|
||||||
{
|
{
|
||||||
var tokenFound = false;
|
var tokenFound = false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue