TemplatePart.CreateParameter Methode

Definition

Erstellt einen TemplatePart , der einen Parameterteil darstellt.

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

Parameter

name
String

Der Name des Parameters.

isCatchAll
Boolean

true , wenn der Parameter ein catch-all-Parameter ist.

isOptional
Boolean

true , wenn der Parameter ein optionaler Parameter ist.

defaultValue
Object

Der Standardwert des Parameters.

inlineConstraints
IEnumerable<InlineConstraint>

Eine Auflistung von Einschränkungen, die dem Parameter zugeordnet sind.

Gibt zurück

Eine TemplatePart-Instanz.

Gilt für: