Share via


CSharpMigrationCodeGenerator.WriteClassStart Method

Definition

Overloads

WriteClassStart(String, String, IndentedTextWriter, String, Boolean, IEnumerable<String>)

Generates a namespace, using statements and class definition.

WriteClassStart(String, String, IndentedTextWriter, String, Boolean)

Generates a namespace, using statements and class definition.

WriteClassStart(String, String, IndentedTextWriter, String, Boolean, IEnumerable<String>)

Generates a namespace, using statements and class definition.

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)

Parameters

namespace
String

Namespace that code should be generated in.

className
String

Name of the class that should be generated.

writer
IndentedTextWriter

Text writer to add the generated code to.

base
String

Base class for the generated class.

designer
Boolean

A value indicating if this class is being generated for a code-behind file.

namespaces
IEnumerable<String>

Namespaces for which using directives will be added. If null, then the namespaces returned from GetDefaultNamespaces will be used.

Attributes

Applies to

WriteClassStart(String, String, IndentedTextWriter, String, Boolean)

Generates a namespace, using statements and class definition.

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)

Parameters

namespace
String

Namespace that code should be generated in.

className
String

Name of the class that should be generated.

writer
IndentedTextWriter

Text writer to add the generated code to.

base
String

Base class for the generated class.

designer
Boolean

A value indicating if this class is being generated for a code-behind file.

Applies to