Partilhar via


Compilation.Emit Método

Definição

Sobrecargas

Emit(Stream, Stream, Stream, Stream, IEnumerable<ResourceDescription>, EmitOptions, CancellationToken)
Emit(Stream, Stream, Stream, Stream, IEnumerable<ResourceDescription>, EmitOptions, IMethodSymbol, CancellationToken)
Emit(Stream, Stream, Stream, Stream, IEnumerable<ResourceDescription>, EmitOptions, IMethodSymbol, Stream, IEnumerable<EmbeddedText>, CancellationToken)
Emit(Stream, Stream, Stream, Stream, IEnumerable<ResourceDescription>, EmitOptions, IMethodSymbol, Stream, IEnumerable<EmbeddedText>, Stream, CancellationToken)

Emita o IL para o código-fonte compilado no fluxo especificado.

Emit(Stream, Stream, Stream, Stream, IEnumerable<ResourceDescription>, EmitOptions, CancellationToken)

Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
public:
 Microsoft::CodeAnalysis::Emit::EmitResult ^ Emit(System::IO::Stream ^ peStream, System::IO::Stream ^ pdbStream, System::IO::Stream ^ xmlDocumentationStream, System::IO::Stream ^ win32Resources, System::Collections::Generic::IEnumerable<Microsoft::CodeAnalysis::ResourceDescription ^> ^ manifestResources, Microsoft::CodeAnalysis::Emit::EmitOptions ^ options, System::Threading::CancellationToken cancellationToken);
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public Microsoft.CodeAnalysis.Emit.EmitResult Emit (System.IO.Stream peStream, System.IO.Stream pdbStream, System.IO.Stream xmlDocumentationStream, System.IO.Stream win32Resources, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.ResourceDescription> manifestResources, Microsoft.CodeAnalysis.Emit.EmitOptions options, System.Threading.CancellationToken cancellationToken);
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public Microsoft.CodeAnalysis.Emit.EmitResult Emit (System.IO.Stream peStream, System.IO.Stream? pdbStream, System.IO.Stream? xmlDocumentationStream, System.IO.Stream? win32Resources, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.ResourceDescription>? manifestResources, Microsoft.CodeAnalysis.Emit.EmitOptions options, System.Threading.CancellationToken cancellationToken);
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
member this.Emit : System.IO.Stream * System.IO.Stream * System.IO.Stream * System.IO.Stream * seq<Microsoft.CodeAnalysis.ResourceDescription> * Microsoft.CodeAnalysis.Emit.EmitOptions * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.Emit.EmitResult
Public Function Emit (peStream As Stream, pdbStream As Stream, xmlDocumentationStream As Stream, win32Resources As Stream, manifestResources As IEnumerable(Of ResourceDescription), options As EmitOptions, cancellationToken As CancellationToken) As EmitResult

Parâmetros

peStream
Stream
pdbStream
Stream
xmlDocumentationStream
Stream
win32Resources
Stream
manifestResources
IEnumerable<ResourceDescription>
options
EmitOptions
cancellationToken
CancellationToken

Retornos

Atributos

Aplica-se a

Emit(Stream, Stream, Stream, Stream, IEnumerable<ResourceDescription>, EmitOptions, IMethodSymbol, CancellationToken)

Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
public:
 Microsoft::CodeAnalysis::Emit::EmitResult ^ Emit(System::IO::Stream ^ peStream, System::IO::Stream ^ pdbStream, System::IO::Stream ^ xmlDocumentationStream, System::IO::Stream ^ win32Resources, System::Collections::Generic::IEnumerable<Microsoft::CodeAnalysis::ResourceDescription ^> ^ manifestResources, Microsoft::CodeAnalysis::Emit::EmitOptions ^ options, Microsoft::CodeAnalysis::IMethodSymbol ^ debugEntryPoint, System::Threading::CancellationToken cancellationToken);
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public Microsoft.CodeAnalysis.Emit.EmitResult Emit (System.IO.Stream peStream, System.IO.Stream pdbStream, System.IO.Stream xmlDocumentationStream, System.IO.Stream win32Resources, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.ResourceDescription> manifestResources, Microsoft.CodeAnalysis.Emit.EmitOptions options, Microsoft.CodeAnalysis.IMethodSymbol debugEntryPoint, System.Threading.CancellationToken cancellationToken);
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
member this.Emit : System.IO.Stream * System.IO.Stream * System.IO.Stream * System.IO.Stream * seq<Microsoft.CodeAnalysis.ResourceDescription> * Microsoft.CodeAnalysis.Emit.EmitOptions * Microsoft.CodeAnalysis.IMethodSymbol * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.Emit.EmitResult
Public Function Emit (peStream As Stream, pdbStream As Stream, xmlDocumentationStream As Stream, win32Resources As Stream, manifestResources As IEnumerable(Of ResourceDescription), options As EmitOptions, debugEntryPoint As IMethodSymbol, cancellationToken As CancellationToken) As EmitResult

Parâmetros

peStream
Stream
pdbStream
Stream
xmlDocumentationStream
Stream
win32Resources
Stream
manifestResources
IEnumerable<ResourceDescription>
options
EmitOptions
debugEntryPoint
IMethodSymbol
cancellationToken
CancellationToken

Retornos

Atributos

Aplica-se a

Emit(Stream, Stream, Stream, Stream, IEnumerable<ResourceDescription>, EmitOptions, IMethodSymbol, Stream, IEnumerable<EmbeddedText>, CancellationToken)

Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
public:
 Microsoft::CodeAnalysis::Emit::EmitResult ^ Emit(System::IO::Stream ^ peStream, System::IO::Stream ^ pdbStream, System::IO::Stream ^ xmlDocumentationStream, System::IO::Stream ^ win32Resources, System::Collections::Generic::IEnumerable<Microsoft::CodeAnalysis::ResourceDescription ^> ^ manifestResources, Microsoft::CodeAnalysis::Emit::EmitOptions ^ options, Microsoft::CodeAnalysis::IMethodSymbol ^ debugEntryPoint, System::IO::Stream ^ sourceLinkStream, System::Collections::Generic::IEnumerable<Microsoft::CodeAnalysis::EmbeddedText ^> ^ embeddedTexts, System::Threading::CancellationToken cancellationToken);
public Microsoft.CodeAnalysis.Emit.EmitResult Emit (System.IO.Stream peStream, System.IO.Stream pdbStream, System.IO.Stream xmlDocumentationStream, System.IO.Stream win32Resources, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.ResourceDescription> manifestResources, Microsoft.CodeAnalysis.Emit.EmitOptions options, Microsoft.CodeAnalysis.IMethodSymbol debugEntryPoint, System.IO.Stream sourceLinkStream, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.EmbeddedText> embeddedTexts, System.Threading.CancellationToken cancellationToken);
public Microsoft.CodeAnalysis.Emit.EmitResult Emit (System.IO.Stream peStream, System.IO.Stream? pdbStream, System.IO.Stream? xmlDocumentationStream, System.IO.Stream? win32Resources, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.ResourceDescription>? manifestResources, Microsoft.CodeAnalysis.Emit.EmitOptions options, Microsoft.CodeAnalysis.IMethodSymbol? debugEntryPoint, System.IO.Stream? sourceLinkStream, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.EmbeddedText>? embeddedTexts, System.Threading.CancellationToken cancellationToken);
member this.Emit : System.IO.Stream * System.IO.Stream * System.IO.Stream * System.IO.Stream * seq<Microsoft.CodeAnalysis.ResourceDescription> * Microsoft.CodeAnalysis.Emit.EmitOptions * Microsoft.CodeAnalysis.IMethodSymbol * System.IO.Stream * seq<Microsoft.CodeAnalysis.EmbeddedText> * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.Emit.EmitResult
Public Function Emit (peStream As Stream, pdbStream As Stream, xmlDocumentationStream As Stream, win32Resources As Stream, manifestResources As IEnumerable(Of ResourceDescription), options As EmitOptions, debugEntryPoint As IMethodSymbol, sourceLinkStream As Stream, embeddedTexts As IEnumerable(Of EmbeddedText), cancellationToken As CancellationToken) As EmitResult

Parâmetros

peStream
Stream
pdbStream
Stream
xmlDocumentationStream
Stream
win32Resources
Stream
manifestResources
IEnumerable<ResourceDescription>
options
EmitOptions
debugEntryPoint
IMethodSymbol
sourceLinkStream
Stream
embeddedTexts
IEnumerable<EmbeddedText>
cancellationToken
CancellationToken

Retornos

Aplica-se a

Emit(Stream, Stream, Stream, Stream, IEnumerable<ResourceDescription>, EmitOptions, IMethodSymbol, Stream, IEnumerable<EmbeddedText>, Stream, CancellationToken)

Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs
Source:
Compilation.cs

Emita o IL para o código-fonte compilado no fluxo especificado.

public Microsoft.CodeAnalysis.Emit.EmitResult Emit (System.IO.Stream peStream, System.IO.Stream pdbStream = default, System.IO.Stream xmlDocumentationStream = default, System.IO.Stream win32Resources = default, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.ResourceDescription> manifestResources = default, Microsoft.CodeAnalysis.Emit.EmitOptions options = default, Microsoft.CodeAnalysis.IMethodSymbol debugEntryPoint = default, System.IO.Stream sourceLinkStream = default, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.EmbeddedText> embeddedTexts = default, System.IO.Stream metadataPEStream = default, System.Threading.CancellationToken cancellationToken = default);
public Microsoft.CodeAnalysis.Emit.EmitResult Emit (System.IO.Stream peStream, System.IO.Stream? pdbStream = default, System.IO.Stream? xmlDocumentationStream = default, System.IO.Stream? win32Resources = default, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.ResourceDescription>? manifestResources = default, Microsoft.CodeAnalysis.Emit.EmitOptions? options = default, Microsoft.CodeAnalysis.IMethodSymbol? debugEntryPoint = default, System.IO.Stream? sourceLinkStream = default, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.EmbeddedText>? embeddedTexts = default, System.IO.Stream? metadataPEStream = default, System.Threading.CancellationToken cancellationToken = default);
member this.Emit : System.IO.Stream * System.IO.Stream * System.IO.Stream * System.IO.Stream * seq<Microsoft.CodeAnalysis.ResourceDescription> * Microsoft.CodeAnalysis.Emit.EmitOptions * Microsoft.CodeAnalysis.IMethodSymbol * System.IO.Stream * seq<Microsoft.CodeAnalysis.EmbeddedText> * System.IO.Stream * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.Emit.EmitResult
Public Function Emit (peStream As Stream, Optional pdbStream As Stream = Nothing, Optional xmlDocumentationStream As Stream = Nothing, Optional win32Resources As Stream = Nothing, Optional manifestResources As IEnumerable(Of ResourceDescription) = Nothing, Optional options As EmitOptions = Nothing, Optional debugEntryPoint As IMethodSymbol = Nothing, Optional sourceLinkStream As Stream = Nothing, Optional embeddedTexts As IEnumerable(Of EmbeddedText) = Nothing, Optional metadataPEStream As Stream = Nothing, Optional cancellationToken As CancellationToken = Nothing) As EmitResult

Parâmetros

peStream
Stream

Transmitir para o qual a compilação será gravada.

pdbStream
Stream

Transmitir para o qual as informações de depuração da compilação serão gravadas. Null para abandonar a geração PDB.

xmlDocumentationStream
Stream

Transmitir para o qual a documentação XML da compilação será gravada. Null para renunciar à geração XML.

win32Resources
Stream

Fluxo do qual os recursos Win32 da compilação serão lidos (no formato RES). Nulo para indicar que não há nenhum. O formato RES começa com uma entrada de recurso nula. Observe que o chamador é responsável por descartar esse fluxo, se fornecido.

manifestResources
IEnumerable<ResourceDescription>

Lista dos recursos gerenciados da compilação. Nulo para indicar que não há nenhum.

options
EmitOptions

Emita opções.

debugEntryPoint
IMethodSymbol

Depurar o ponto de entrada do assembly. O token de método é armazenado no fluxo de PDB gerado.

Quando um programa é iniciado com um depurador anexado, o depurador coloca o primeiro ponto de interrupção para o início do método de ponto de entrada de depuração. O CLR começa a executar o método principal estático do MainTypeName tipo. Quando o primeiro ponto de interrupção é atingido nas etapas do depurador por meio da instrução de código por instrução até que o código do usuário seja atingido, ignorando métodos marcados por DebuggerHiddenAttributee levando em consideração outros atributos de depuração.

Por padrão, ambos os pontos de entrada em um programa executável (ConsoleApplication, WindowsApplication, WindowsRuntimeApplication) são o mesmo método (Main). Um programa não executável não tem ponto de entrada. Runtimes que implementam um carregador personalizado podem especificar o ponto de entrada de depuração para forçar o depurador a ignorar a complexa lógica de carregador personalizado executada no início do .exe e, portanto, melhorar a experiência de depuração.

Ao contrário do ponto de entrada comum que é limitado a um método estático não genérico de assinatura específica, não há restrições ao debugEntryPoint método além de ter um corpo do método (métodos extern, interface ou abstratos não são permitidos).

sourceLinkStream
Stream

Fluxo contendo informações que vinculam a compilação a um controle de origem.

embeddedTexts
IEnumerable<EmbeddedText>

Textos a serem inseridos no PDB. Só há suporte ao emitir PDBs portáteis.

metadataPEStream
Stream

Transmitir para o qual a saída somente de metadados será gravada.

cancellationToken
CancellationToken

Para cancelar o processo de emissão.

Retornos

Aplica-se a