GeneratorExecutionContext.AddSource Метод

Определение

Перегрузки

AddSource(String, SourceText)

Добавляет в SourceText компиляцию

AddSource(String, String)

Добавляет исходный код в виде в String компиляцию.

AddSource(String, SourceText)

Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs

Добавляет в SourceText компиляцию

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)

Параметры

hintName
String

Идентификатор, который можно использовать для ссылки на этот исходный текст, должен быть уникальным в пределах этого генератора.

sourceText
SourceText

Объект , SourceText добавляемый в компиляцию

Комментарии

Разделители каталогов "/" и "" разрешены в hintName, они нормализуются до "/" независимо от платформы узла.

Применяется к

AddSource(String, String)

Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs
Source:
GeneratorContexts.cs

Добавляет исходный код в виде в String компиляцию.

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

Параметры

hintName
String

Идентификатор, который можно использовать для ссылки на этот исходный текст, должен быть уникальным в пределах этого генератора.

source
String

Исходный код для добавления в компиляцию

Применяется к