Udostępnij za pośrednictwem


TemplatePart.CreateParameter Metoda

Definicja

Tworzy reprezentację TemplatePart części 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

Nazwa parametru.

isCatchAll
Boolean

true jeśli parametr jest parametrem catch-all.

isOptional
Boolean

true jeśli parametr jest opcjonalnym parametrem.

defaultValue
Object

Wartość domyślna parametru.

inlineConstraints
IEnumerable<InlineConstraint>

Kolekcja ograniczeń skojarzonych z parametrem.

Zwraca

TemplatePart Wystąpienie.

Dotyczy