CSharpMigrationCodeGenerator.WriteClassStart 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| WriteClassStart(String, String, IndentedTextWriter, String, Boolean, IEnumerable<String>) |
透過語句與類別定義產生命名空間。 |
| WriteClassStart(String, String, IndentedTextWriter, String, Boolean) |
透過語句與類別定義產生命名空間。 |
WriteClassStart(String, String, IndentedTextWriter, String, Boolean, IEnumerable<String>)
透過語句與類別定義產生命名空間。
protected virtual void WriteClassStart(string namespace, string className, System.Data.Entity.Migrations.Utilities.IndentedTextWriter writer, string base, bool designer = false, System.Collections.Generic.IEnumerable<string> namespaces = null);
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId="namespace")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId="base")]
protected virtual void WriteClassStart(string namespace, string className, System.Data.Entity.Migrations.Utilities.IndentedTextWriter writer, string base, bool designer = false, System.Collections.Generic.IEnumerable<string> namespaces = null);
abstract member WriteClassStart : string * string * System.Data.Entity.Migrations.Utilities.IndentedTextWriter * string * bool * seq<string> -> unit
override this.WriteClassStart : string * string * System.Data.Entity.Migrations.Utilities.IndentedTextWriter * string * bool * seq<string> -> unit
Protected Overridable Sub WriteClassStart (namespace As String, className As String, writer As IndentedTextWriter, base As String, Optional designer As Boolean = false, Optional namespaces As IEnumerable(Of String) = null)
參數
- namespace
- String
該代碼應該在命名空間產生。
- className
- String
應該產生的類別名稱。
- writer
- IndentedTextWriter
文字編輯器,用來加入產生的程式碼。
- base
- String
產生的類別的基底類別。
- designer
- Boolean
一個值,表示此類別是否正在為程式碼背後的檔案產生。
- namespaces
- IEnumerable<String>
將新增使用指令的命名空間。 若為空,則會使用從 GetDefaultNamespaces 回傳的命名空間。
- 屬性
適用於
WriteClassStart(String, String, IndentedTextWriter, String, Boolean)
透過語句與類別定義產生命名空間。
protected virtual void WriteClassStart(string namespace, string className, System.Data.Entity.Migrations.Utilities.IndentedTextWriter writer, string base, bool designer = false);
abstract member WriteClassStart : string * string * System.Data.Entity.Migrations.Utilities.IndentedTextWriter * string * bool -> unit
override this.WriteClassStart : string * string * System.Data.Entity.Migrations.Utilities.IndentedTextWriter * string * bool -> unit
Protected Overridable Sub WriteClassStart (namespace As String, className As String, writer As IndentedTextWriter, base As String, Optional designer As Boolean = false)
參數
- namespace
- String
該代碼應該在命名空間產生。
- className
- String
應該產生的類別名稱。
- writer
- IndentedTextWriter
文字編輯器,用來加入產生的程式碼。
- base
- String
產生的類別的基底類別。
- designer
- Boolean
一個值,表示此類別是否正在為程式碼背後的檔案產生。