Sdílet prostřednictvím


TemplatePart.CreateParameter Metoda

Definice

Vytvoří představující TemplatePart část parametru.

public:
 static Microsoft::AspNetCore::Routing::Template::TemplatePart ^ CreateParameter(System::String ^ name, bool isCatchAll, bool isOptional, System::Object ^ defaultValue, System::Collections::Generic::IEnumerable<Microsoft::AspNetCore::Routing::Template::InlineConstraint ^> ^ inlineConstraints);
public static Microsoft.AspNetCore.Routing.Template.TemplatePart CreateParameter (string name, bool isCatchAll, bool isOptional, object defaultValue, System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Routing.Template.InlineConstraint> inlineConstraints);
public static Microsoft.AspNetCore.Routing.Template.TemplatePart CreateParameter (string name, bool isCatchAll, bool isOptional, object? defaultValue, System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Routing.Template.InlineConstraint>? inlineConstraints);
static member CreateParameter : string * bool * bool * obj * seq<Microsoft.AspNetCore.Routing.Template.InlineConstraint> -> Microsoft.AspNetCore.Routing.Template.TemplatePart
Public Shared Function CreateParameter (name As String, isCatchAll As Boolean, isOptional As Boolean, defaultValue As Object, inlineConstraints As IEnumerable(Of InlineConstraint)) As TemplatePart

Parametry

name
String

Název parametru

isCatchAll
Boolean

true pokud je parametr catch-all parametr.

isOptional
Boolean

true pokud je parametr volitelný parametr.

defaultValue
Object

Výchozí hodnota parametru.

inlineConstraints
IEnumerable<InlineConstraint>

Kolekce omezení přidružených k parametru .

Návraty

Instance TemplatePart .

Platí pro