Share via


VisualBasicMigrationCodeGenerator.GenerateAnnotation Method

Definition

Generates code for the given annotation value, which may be null. The default behavior is to use an AnnotationCodeGenerator if one is registered, otherwise call ToString on the annotation value.

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)

Parameters

name
String

The name of the annotation for which code is needed.

annotation
Object

The annotation value to generate.

writer
IndentedTextWriter

The writer to which generated code should be written.

Remarks

Note that a AnnotationCodeGenerator can be registered to generate code for custom annotations without the need to override the entire code generator.

Applies to