GeneratorExecutionContext.AddSource Method

Definition

Overloads

AddSource(String, SourceText)

Adds a SourceText to the compilation

AddSource(String, String)

Adds source code in the form of a String to the compilation.

AddSource(String, SourceText)

Adds a SourceText to the compilation

public void AddSource (string hintName, Microsoft.CodeAnalysis.Text.SourceText sourceText);
member this.AddSource : string * Microsoft.CodeAnalysis.Text.SourceText -> unit
Public Sub AddSource (hintName As String, sourceText As SourceText)

Parameters

hintName
String

An identifier that can be used to reference this source text, must be unique within this generator

sourceText
SourceText

The SourceText to add to the compilation

Applies to

AddSource(String, String)

Adds source code in the form of a String to the compilation.

public void AddSource (string hintName, string source);
member this.AddSource : string * string -> unit
Public Sub AddSource (hintName As String, source As String)

Parameters

hintName
String

An identifier that can be used to reference this source text, must be unique within this generator

source
String

The source code to add to the compilation

Applies to