Dela via


RoutePatternTransformer.SubstituteRequiredValues Method

Definition

Overloads

SubstituteRequiredValues(RoutePattern, RouteValueDictionary)

Attempts to substitute the provided requiredValues into the provided original.

SubstituteRequiredValues(RoutePattern, Object)

Attempts to substitute the provided requiredValues into the provided original.

SubstituteRequiredValues(RoutePattern, RouteValueDictionary)

Source:
RoutePatternTransformer.cs

Attempts to substitute the provided requiredValues into the provided original.

public virtual Microsoft.AspNetCore.Routing.Patterns.RoutePattern? SubstituteRequiredValues (Microsoft.AspNetCore.Routing.Patterns.RoutePattern original, Microsoft.AspNetCore.Routing.RouteValueDictionary requiredValues);
abstract member SubstituteRequiredValues : Microsoft.AspNetCore.Routing.Patterns.RoutePattern * Microsoft.AspNetCore.Routing.RouteValueDictionary -> Microsoft.AspNetCore.Routing.Patterns.RoutePattern
override this.SubstituteRequiredValues : Microsoft.AspNetCore.Routing.Patterns.RoutePattern * Microsoft.AspNetCore.Routing.RouteValueDictionary -> Microsoft.AspNetCore.Routing.Patterns.RoutePattern
Public Overridable Function SubstituteRequiredValues (original As RoutePattern, requiredValues As RouteValueDictionary) As RoutePattern

Parameters

original
RoutePattern

The original RoutePattern.

requiredValues
RouteValueDictionary

The required values to substitute.

Returns

A new RoutePattern if substitution succeeds, otherwise null.

Remarks

Substituting required values into a route pattern is intended for us with a general-purpose parameterize route specification that can match many logical endpoints. Calling SubstituteRequiredValues(RoutePattern, Object) can produce a derived route pattern for each set of route values that corresponds to an endpoint.

The substitution process considers default values and IRouteConstraint implementations when examining a required value. SubstituteRequiredValues(RoutePattern, Object) will return null if any required value cannot be substituted.

Applies to

SubstituteRequiredValues(RoutePattern, Object)

Source:
RoutePatternTransformer.cs

Attempts to substitute the provided requiredValues into the provided original.

public:
 abstract Microsoft::AspNetCore::Routing::Patterns::RoutePattern ^ SubstituteRequiredValues(Microsoft::AspNetCore::Routing::Patterns::RoutePattern ^ original, System::Object ^ requiredValues);
public abstract Microsoft.AspNetCore.Routing.Patterns.RoutePattern SubstituteRequiredValues (Microsoft.AspNetCore.Routing.Patterns.RoutePattern original, object requiredValues);
public abstract Microsoft.AspNetCore.Routing.Patterns.RoutePattern? SubstituteRequiredValues (Microsoft.AspNetCore.Routing.Patterns.RoutePattern original, object requiredValues);
abstract member SubstituteRequiredValues : Microsoft.AspNetCore.Routing.Patterns.RoutePattern * obj -> Microsoft.AspNetCore.Routing.Patterns.RoutePattern
Public MustOverride Function SubstituteRequiredValues (original As RoutePattern, requiredValues As Object) As RoutePattern

Parameters

original
RoutePattern

The original RoutePattern.

requiredValues
Object

The required values to substitute.

Returns

A new RoutePattern if substitution succeeds, otherwise null.

Remarks

Substituting required values into a route pattern is intended for us with a general-purpose parameterize route specification that can match many logical endpoints. Calling SubstituteRequiredValues(RoutePattern, Object) can produce a derived route pattern for each set of route values that corresponds to an endpoint.

The substitution process considers default values and IRouteConstraint implementations when examining a required value. SubstituteRequiredValues(RoutePattern, Object) will return null if any required value cannot be substituted.

Applies to