VisualBasicMigrationCodeGenerator.GenerateAnnotation 方法

定义

为给定批注值生成代码,该值可能为 null。 如果注册了 , AnnotationCodeGenerator 则默认行为是使用 ,否则对批注值调用 ToString。

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)

参数

name
String

需要其代码的注释的名称。

annotation
Object

要生成的批注值。

writer
IndentedTextWriter

生成代码应写入的编写器。

注解

请注意, AnnotationCodeGenerator 可以注册 为自定义注释生成代码,而无需重写整个代码生成器。

适用于