Compartir a través de


CSharpMigrationCodeGenerator.GenerateAnnotation Método

Definición

Genera código para el valor de anotación especificado, que puede ser NULL. El comportamiento predeterminado es usar si AnnotationCodeGenerator se registra uno; de lo contrario, llama a ToString en el valor de anotación.

protected internal virtual void GenerateAnnotation (string name, object annotation, System.Data.Entity.Migrations.Utilities.IndentedTextWriter writer);
abstract member GenerateAnnotation : string * obj * System.Data.Entity.Migrations.Utilities.IndentedTextWriter -> unit
override this.GenerateAnnotation : string * obj * System.Data.Entity.Migrations.Utilities.IndentedTextWriter -> unit
Protected Friend Overridable Sub GenerateAnnotation (name As String, annotation As Object, writer As IndentedTextWriter)

Parámetros

name
String

Nombre de la anotación para la que se necesita código.

annotation
Object

Valor de anotación que se va a generar.

writer
IndentedTextWriter

Escritor en el que se debe escribir el código generado.

Comentarios

Tenga en cuenta que se puede registrar para AnnotationCodeGenerator generar código para anotaciones personalizadas sin necesidad de invalidar todo el generador de código.

Se aplica a