次の方法で共有


CSharpMigrationCodeGenerator.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は、コード ジェネレーター全体をオーバーライドすることなく、カスタム注釈のコードを生成するために登録できることに注意してください。

適用対象