Compilation.Emit Metodo

Definizione

Overload

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)

Generare il codice sorgente compilato nel flusso specificato.

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

Parametri

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

Restituisce

Attributi

Si applica 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

Parametri

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

Restituisce

Attributi

Si applica 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

Parametri

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

Restituisce

Si applica 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

Generare il codice sorgente compilato nel flusso specificato.

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

Parametri

peStream
Stream

Flusso a cui verrà scritta la compilazione.

pdbStream
Stream

Trasmettere a cui verranno scritte le informazioni di debug della compilazione. Null per rinunciare alla generazione di PDB.

xmlDocumentationStream
Stream

Flusso a cui verrà scritta la documentazione XML della compilazione. Null per rinunciare alla generazione XML.

win32Resources
Stream

Flusso da cui verranno lette le risorse Win32 della compilazione (in formato RES). Null per indicare che non ci sono. Il formato RES inizia con una voce di risorsa Null. Si noti che il chiamante è responsabile della eliminazione di questo flusso, se specificato.

manifestResources
IEnumerable<ResourceDescription>

Elenco delle risorse gestite della compilazione. Null per indicare che non ci sono.

options
EmitOptions

Genera opzioni.

debugEntryPoint
IMethodSymbol

Eseguire il debug del punto di ingresso dell'assembly. Il token del metodo viene archiviato nel flusso PDB generato.

Quando un programma viene avviato con un debugger collegato al debugger inserisce il primo punto di interruzione all'inizio del metodo di ingresso del debug. CLR avvia l'esecuzione del metodo Main statico di MainTypeName tipo. Quando il primo punto di interruzione viene raggiunto i passaggi del debugger attraverso l'istruzione code by statement finché il codice utente non viene raggiunto, ignorando i metodi contrassegnati da DebuggerHiddenAttributee prendendo in considerazione altri attributi di debug.

Per impostazione predefinita, entrambi i punti di ingresso in un programma eseguibile (, WindowsApplication, WindowsRuntimeApplication) sono lo stesso metodo (ConsoleApplicationMain). Un programma non eseguibile non ha un punto di ingresso. I runtime che implementano un caricatore personalizzato possono specificare il punto di ingresso di debug per forzare il debugger di ignorare la logica del caricatore personalizzata complessa eseguita all'inizio della .exe e quindi migliorare l'esperienza di debug.

A differenza del punto di ingresso ordinario limitato a un metodo statico non generico di firma specifica, non sono consentite restrizioni sul debugEntryPoint metodo diverso dalla presenza di un corpo del metodo (extern, interfaccia o metodi astratti).

sourceLinkStream
Stream

Flusso contenente informazioni che collegano la compilazione a un controllo del codice sorgente.

embeddedTexts
IEnumerable<EmbeddedText>

Testi da incorporare nel PDB. Supportato solo durante l'emissione di PDB portabili.

metadataPEStream
Stream

Flusso a cui verrà scritto l'output solo dei metadati.

cancellationToken
CancellationToken

Per annullare il processo di emissione.

Restituisce

Si applica a