RoutePattern.RequiredValues Property

Definition

Gets a collection of route values that must be provided for this route pattern to be considered applicable.

C#
public System.Collections.Generic.IReadOnlyDictionary<string,object> RequiredValues { get; }
C#
public System.Collections.Generic.IReadOnlyDictionary<string,object?> RequiredValues { get; }

Property Value

Remarks

RequiredValues allows a framework to substitute route values into a parameterized template so that the same route template specification can be used to create multiple route patterns.

Route Template: "{controller=Home}/{action=Index}/{id?}"
Route Values: { controller = "Store", action = "Index" }

A route pattern produced in this way will match and generate URL paths like: /Store, /Store/Index, and /Store/Index/17.

Applies to

Produkt Versiounen
ASP.NET Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0