Partilhar via


TemplatePart.CreateParameter Método

Definição

Cria um TemplatePart que representa uma parte de parâmetro.

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

Parâmetros

name
String

O nome do parâmetro.

isCatchAll
Boolean

true se o parâmetro for um parâmetro catch-all.

isOptional
Boolean

true se o parâmetro for um parâmetro opcional.

defaultValue
Object

O valor padrão do parâmetro.

inlineConstraints
IEnumerable<InlineConstraint>

Uma coleção de restrições associadas ao parâmetro .

Retornos

Uma instância de TemplatePart.

Aplica-se a