Improve formatting
This commit is contained in:
parent
1165a1de33
commit
d39305aa91
|
|
@ -342,7 +342,7 @@ namespace Microsoft.AspNetCore.Routing.Template
|
||||||
// This optional parameter is the last part in the segment
|
// This optional parameter is the last part in the segment
|
||||||
if (i == segment.Parts.Count - 1)
|
if (i == segment.Parts.Count - 1)
|
||||||
{
|
{
|
||||||
if(!segment.Parts[i - 1].IsLiteral)
|
if (!segment.Parts[i - 1].IsLiteral)
|
||||||
{
|
{
|
||||||
// The optional parameter is preceded by something that is not a literal.
|
// The optional parameter is preceded by something that is not a literal.
|
||||||
// Example of error message:
|
// Example of error message:
|
||||||
|
|
@ -356,7 +356,7 @@ namespace Microsoft.AspNetCore.Routing.Template
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(segment.Parts[i - 1].Text != PeriodString)
|
else if (segment.Parts[i - 1].Text != PeriodString)
|
||||||
{
|
{
|
||||||
// The optional parameter is preceded by a literal other than period.
|
// The optional parameter is preceded by a literal other than period.
|
||||||
// Example of error message:
|
// Example of error message:
|
||||||
|
|
@ -370,6 +370,7 @@ namespace Microsoft.AspNetCore.Routing.Template
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
segment.Parts[i - 1].IsOptionalSeperator = true;
|
segment.Parts[i - 1].IsOptionalSeperator = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -385,8 +386,7 @@ namespace Microsoft.AspNetCore.Routing.Template
|
||||||
Resources.TemplateRoute_OptionalParameterHasTobeTheLast,
|
Resources.TemplateRoute_OptionalParameterHasTobeTheLast,
|
||||||
segment.DebuggerToString(),
|
segment.DebuggerToString(),
|
||||||
segment.Parts[i].Name,
|
segment.Parts[i].Name,
|
||||||
invalidPartText
|
invalidPartText);
|
||||||
);
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue