Compartir a través de


TemplatePart.CreateParameter Método

Definición

Crea un objeto TemplatePart que representa una 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

El nombre del parámetro.

isCatchAll
Boolean

true si el parámetro es un parámetro catch-all.

isOptional
Boolean

true si el parámetro es un parámetro opcional.

defaultValue
Object

Valor predeterminado del parámetro.

inlineConstraints
IEnumerable<InlineConstraint>

Colección de restricciones asociadas al parámetro .

Devoluciones

Instancia de TemplatePart.

Se aplica a