RoutePattern.RequiredValues Property

Definition

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

public:
 property System::Collections::Generic::IReadOnlyDictionary<System::String ^, System::Object ^> ^ RequiredValues { System::Collections::Generic::IReadOnlyDictionary<System::String ^, System::Object ^> ^ get(); };
public System.Collections.Generic.IReadOnlyDictionary<string,object> RequiredValues { get; }
public System.Collections.Generic.IReadOnlyDictionary<string,object?> RequiredValues { get; }
member this.RequiredValues : System.Collections.Generic.IReadOnlyDictionary<string, obj>
Public ReadOnly Property RequiredValues As IReadOnlyDictionary(Of String, Object)

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