Fixed error message related to escaping curly braces.
This commit is contained in:
parent
071b616178
commit
755d436840
|
|
@ -363,7 +363,7 @@ namespace Microsoft.AspNetCore.Routing
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// In a route parameter, '{' and '}' must be escaped with '{{' and '}}'
|
||||
/// In a route parameter, '{' and '}' must be escaped with '{{' and '}}'.
|
||||
/// </summary>
|
||||
internal static string TemplateRoute_UnescapedBrace
|
||||
{
|
||||
|
|
@ -371,7 +371,7 @@ namespace Microsoft.AspNetCore.Routing
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// In a route parameter, '{' and '}' must be escaped with '{{' and '}}'
|
||||
/// In a route parameter, '{' and '}' must be escaped with '{{' and '}}'.
|
||||
/// </summary>
|
||||
internal static string FormatTemplateRoute_UnescapedBrace()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
|
|
@ -26,36 +26,36 @@
|
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
|
|
@ -184,7 +184,7 @@
|
|||
<value>The constraint entry '{0}' - '{1}' on the route '{2}' could not be resolved by the constraint resolver of type '{3}'.</value>
|
||||
</data>
|
||||
<data name="TemplateRoute_UnescapedBrace" xml:space="preserve">
|
||||
<value>In a route parameter, '{' and '}' must be escaped with '{{' and '}}'</value>
|
||||
<value>In a route parameter, '{' and '}' must be escaped with '{{' and '}}'.</value>
|
||||
</data>
|
||||
<data name="TemplateRoute_OptionalParameterCanbBePrecededByPeriod" xml:space="preserve">
|
||||
<value>In the segment '{0}', the optional parameter '{1}' is preceded by an invalid segment '{2}'. Only a period (.) can precede an optional parameter.</value>
|
||||
|
|
|
|||
|
|
@ -521,7 +521,7 @@ namespace Microsoft.AspNetCore.Routing.Template.Tests
|
|||
// Act and Assert
|
||||
ExceptionAssert.Throws<ArgumentException>(
|
||||
() => TemplateParser.Parse(template),
|
||||
"In a route parameter, '{' and '}' must be escaped with '{{' and '}}'" + Environment.NewLine +
|
||||
"In a route parameter, '{' and '}' must be escaped with '{{' and '}}'." + Environment.NewLine +
|
||||
"Parameter name: routeTemplate");
|
||||
}
|
||||
|
||||
|
|
@ -532,8 +532,8 @@ namespace Microsoft.AspNetCore.Routing.Template.Tests
|
|||
[InlineData("{p1}.{p2?})", "p2", ")")]
|
||||
[InlineData("{foorb?}-bar-{z}", "foorb", "-bar-")]
|
||||
public void Parse_ComplexSegment_OptionalParameter_NotTheLastPart(
|
||||
string template,
|
||||
string parameter,
|
||||
string template,
|
||||
string parameter,
|
||||
string invalid)
|
||||
{
|
||||
// Act and Assert
|
||||
|
|
@ -554,8 +554,8 @@ namespace Microsoft.AspNetCore.Routing.Template.Tests
|
|||
// Act and Assert
|
||||
ExceptionAssert.Throws<ArgumentException>(
|
||||
() => TemplateParser.Parse(template),
|
||||
"In the complex segment '"+ template +"', the optional parameter 'p2' is preceded by an invalid " +
|
||||
"segment '" + parameter +"'. Only valid literal to precede an optional parameter is a period (.)." +
|
||||
"In the complex segment '"+ template +"', the optional parameter 'p2' is preceded by an invalid " +
|
||||
"segment '" + parameter +"'. Only valid literal to precede an optional parameter is a period (.)." +
|
||||
Environment.NewLine + "Parameter name: routeTemplate");
|
||||
}
|
||||
|
||||
|
|
@ -708,7 +708,7 @@ namespace Microsoft.AspNetCore.Routing.Template.Tests
|
|||
{
|
||||
ExceptionAssert.Throws<ArgumentException>(
|
||||
() => TemplateParser.Parse("{a}/{a{aa}/{z}"),
|
||||
"In a route parameter, '{' and '}' must be escaped with '{{' and '}}'" + Environment.NewLine +
|
||||
"In a route parameter, '{' and '}' must be escaped with '{{' and '}}'." + Environment.NewLine +
|
||||
"Parameter name: routeTemplate");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue