Compartir a través de


Compilation.Emit Método

Definición

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 el IL para el código fuente compilado en la secuencia especificada.

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

Devoluciones

Atributos

Se aplica 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

Devoluciones

Atributos

Se aplica 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

Devoluciones

Se aplica 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 el IL para el código fuente compilado en la secuencia especificada.

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

Secuencia en la que se escribirá la compilación.

pdbStream
Stream

Transmita a la que se escribirá la información de depuración de la compilación. Null para renunciar a la generación de PDB.

xmlDocumentationStream
Stream

Transmita a la que se escribirá la documentación XML de la compilación. Null para renunciar a la generación XML.

win32Resources
Stream

Secuencia desde la que se leerán los recursos win32 de la compilación (en formato RES). Null para indicar que no hay ninguno. El formato RES comienza con una entrada de recurso null. Tenga en cuenta que el autor de la llamada es responsable de eliminar esta secuencia, si se proporciona.

manifestResources
IEnumerable<ResourceDescription>

Lista de los recursos administrados de la compilación. Null para indicar que no hay ninguno.

options
EmitOptions

Opciones de emisión.

debugEntryPoint
IMethodSymbol

Depuración del punto de entrada del ensamblado. El token de método se almacena en el flujo de PDB generado.

Cuando un programa se inicia con un depurador asociado, el depurador coloca el primer punto de interrupción al inicio del método de punto de entrada de depuración. CLR comienza a ejecutar el método Main estático de MainTypeName tipo . Cuando se alcanza el primer punto de interrupción, los pasos del depurador se convierten en la instrucción code por instrucción hasta que se alcanza el código de usuario, omite los métodos marcados por DebuggerHiddenAttributey toman en consideración otros atributos de depuración.

De forma predeterminada, ambos puntos de entrada de un programa ejecutable (ConsoleApplication, WindowsApplication, WindowsRuntimeApplication) son el mismo método (Main). Un programa no ejecutable no tiene ningún punto de entrada. Los entornos de ejecución que implementan un cargador personalizado pueden especificar el punto de entrada de depuración para forzar al depurador a omitir la lógica compleja del cargador personalizado que se ejecuta al principio del .exe y, por tanto, mejorar la experiencia de depuración.

A diferencia del punto de entrada normal que se limita a un método estático no genérico de una firma específica, no hay restricciones en el debugEntryPoint método que no sea tener un cuerpo de método (no se permiten métodos extern, interfaz o abstractos).

sourceLinkStream
Stream

Secuencia que contiene información que vincula la compilación a un control de código fuente.

embeddedTexts
IEnumerable<EmbeddedText>

Textos que se van a insertar en la PDB. Solo se admite al emitir archivos PDB portables.

metadataPEStream
Stream

Transmita a la que se escribirá la salida de solo metadatos.

cancellationToken
CancellationToken

Para cancelar el proceso de emisión.

Devoluciones

Se aplica a