|
|
@@ -3,6 +3,7 @@
|
|
|
|
|
|
#nullable enable
|
|
|
|
|
|
+using System.Linq;
|
|
|
namespace Microsoft.AspNetCore.Routing;
|
|
|
|
|
|
/// <summary>
|
|
|
@@ -10,6 +11,7 @@ namespace Microsoft.AspNetCore.Routing;
|
|
|
/// </summary>
|
|
|
public class RouteValuesAddress
|
|
|
{
|
|
|
+ private string? _toString;
|
|
|
/// <summary>
|
|
|
/// Gets or sets the route name.
|
|
|
/// </summary>
|
|
|
@@ -24,4 +26,11 @@ public class RouteValuesAddress
|
|
|
/// Gets or sets ambient route values from the current HTTP request.
|
|
|
/// </summary>
|
|
|
public RouteValueDictionary? AmbientValues { get; set; }
|
|
|
+
|
|
|
+ /// <inheritdoc />
|
|
|
+ public override string? ToString()
|
|
|
+ {
|
|
|
+ _toString ??= $"{RouteName}({string.Join(',', ExplicitValues.Select(kv => $"{kv.Key}=[{kv.Value}]"))})";
|
|
|
+ return _toString;
|
|
|
+ }
|
|
|
}
|