Fixed trackAllCaptures enum naming

This commit is contained in:
Mikael Mengistu 2016-11-03 19:48:25 -07:00 коммит произвёл GitHub
Родитель 623333a919
Коммит c8b5a48b76
4 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -27,7 +27,7 @@ namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite
public const string Rule = "rule";
public const string Rules = "rules";
public const string StopProcessing = "stopProcessing";
public const string TrackingAllCaptures = "trackingAllCaptures";
public const string TrackAllCaptures = "trackAllCaptures";
public const string Type = "type";
public const string Url = "url";
}

Просмотреть файл

@ -109,8 +109,8 @@ namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite
}
var grouping = ParseEnum(conditions, RewriteTags.LogicalGrouping, LogicalGrouping.MatchAll);
var trackingAllCaptures = ParseBool(conditions, RewriteTags.TrackingAllCaptures, defaultValue: false);
builder.AddUrlConditions(grouping, trackingAllCaptures);
var trackAllCaptures = ParseBool(conditions, RewriteTags.TrackAllCaptures, defaultValue: false);
builder.AddUrlConditions(grouping, trackAllCaptures);
foreach (var cond in conditions.Elements(RewriteTags.Add))
{

Просмотреть файл

@ -90,7 +90,7 @@ namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite
// If there are no conditions specified
if (_conditions == null)
{
AddUrlConditions(LogicalGrouping.MatchAll, trackingAllCaptures: false);
AddUrlConditions(LogicalGrouping.MatchAll, trackAllCaptures: false);
}
switch (patternSyntax)
@ -144,7 +144,7 @@ namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite
}
}
public void AddUrlConditions(LogicalGrouping logicalGrouping, bool trackingAllCaptures)
public void AddUrlConditions(LogicalGrouping logicalGrouping, bool trackAllCaptures)
{
_conditions = new List<Condition>();
_matchAny = logicalGrouping == LogicalGrouping.MatchAny;

Просмотреть файл

@ -240,14 +240,14 @@ namespace Microsoft.AspNetCore.Rewrite.Tests.UrlRewrite
<rules>
<rule name=""Remove trailing slash"">
<match url = ""(.*)/$""/>
<conditions trackingAllCaptures=""foo"">
<conditions trackAllCaptures=""foo"">
<add input=""{REQUEST_FILENAME}""/>
</conditions>
<action type=""Redirect"" url =""{R:1}"" />
</rule>
</rules>
</rewrite>",
"Could not parse the UrlRewrite file. Message: 'The trackingAllCaptures parameter 'foo' was not recognized'. Line number '5': '14'.")]
"Could not parse the UrlRewrite file. Message: 'The trackAllCaptures parameter 'foo' was not recognized'. Line number '5': '14'.")]
[InlineData(
@"<rewrite>
<rules>