TagHelperAttributeValueCodeRenderer.RenderAttributeValue Método

Definición

Se llama durante el proceso de generación de código de Razor para generar código que crea una instancia del valor de la propiedad de la aplicación auxiliar de etiquetas. El último valor escrito no debe ser ni terminar con un punto y coma.

public:
 virtual void RenderAttributeValue(Microsoft::AspNetCore::Razor::Compilation::TagHelpers::TagHelperAttributeDescriptor ^ attributeDescriptor, Microsoft::AspNetCore::Razor::CodeGenerators::CSharpCodeWriter ^ writer, Microsoft::AspNetCore::Razor::CodeGenerators::CodeGeneratorContext ^ context, Action<Microsoft::AspNetCore::Razor::CodeGenerators::CSharpCodeWriter ^> ^ renderAttributeValue, bool complexValue);
public virtual void RenderAttributeValue (Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDescriptor attributeDescriptor, Microsoft.AspNetCore.Razor.CodeGenerators.CSharpCodeWriter writer, Microsoft.AspNetCore.Razor.CodeGenerators.CodeGeneratorContext context, Action<Microsoft.AspNetCore.Razor.CodeGenerators.CSharpCodeWriter> renderAttributeValue, bool complexValue);
abstract member RenderAttributeValue : Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDescriptor * Microsoft.AspNetCore.Razor.CodeGenerators.CSharpCodeWriter * Microsoft.AspNetCore.Razor.CodeGenerators.CodeGeneratorContext * Action<Microsoft.AspNetCore.Razor.CodeGenerators.CSharpCodeWriter> * bool -> unit
override this.RenderAttributeValue : Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDescriptor * Microsoft.AspNetCore.Razor.CodeGenerators.CSharpCodeWriter * Microsoft.AspNetCore.Razor.CodeGenerators.CodeGeneratorContext * Action<Microsoft.AspNetCore.Razor.CodeGenerators.CSharpCodeWriter> * bool -> unit
Public Overridable Sub RenderAttributeValue (attributeDescriptor As TagHelperAttributeDescriptor, writer As CSharpCodeWriter, context As CodeGeneratorContext, renderAttributeValue As Action(Of CSharpCodeWriter), complexValue As Boolean)

Parámetros

attributeDescriptor
TagHelperAttributeDescriptor

TagHelperAttributeDescriptor para el que se va a generar código.

writer
CSharpCodeWriter

CSharpCodeWriterQue se usa para escribir código.

context
CodeGeneratorContext

ChunkGeneratorContextInstancia de que contiene información sobre el proceso de generación de código actual.

renderAttributeValue
Action<CSharpCodeWriter>

Action que representa el valor sin formato del atributo HTML.

complexValue
Boolean

Indica si el valor del atributo de origen contiene o no texto más sencillo. false para expresiones de C# sin formato, por ejemplo, "PropertyName". true si el valor del atributo contiene al menos una construcción de Razor en línea, por ejemplo, "@ ( @readonly )".

Se aplica a