Compilation.Emit Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Surcharges
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
Paramètres
- peStream
- Stream
- pdbStream
- Stream
- xmlDocumentationStream
- Stream
- win32Resources
- Stream
- manifestResources
- IEnumerable<ResourceDescription>
- options
- EmitOptions
- cancellationToken
- CancellationToken
Retours
- Attributs
S’applique à
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
Paramètres
- peStream
- Stream
- pdbStream
- Stream
- xmlDocumentationStream
- Stream
- win32Resources
- Stream
- manifestResources
- IEnumerable<ResourceDescription>
- options
- EmitOptions
- debugEntryPoint
- IMethodSymbol
- cancellationToken
- CancellationToken
Retours
- Attributs
S’applique à
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
Paramètres
- peStream
- Stream
- pdbStream
- Stream
- xmlDocumentationStream
- Stream
- win32Resources
- Stream
- manifestResources
- IEnumerable<ResourceDescription>
- options
- EmitOptions
- debugEntryPoint
- IMethodSymbol
- sourceLinkStream
- Stream
- embeddedTexts
- IEnumerable<EmbeddedText>
- cancellationToken
- CancellationToken
Retours
S’applique à
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
Émettez l’il pour le code source compilé dans le flux spécifié.
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
Paramètres
- peStream
- Stream
Diffuser en continu vers lequel la compilation sera écrite.
- pdbStream
- Stream
Diffuser en continu les informations de débogage de la compilation. Null pour la génération PDB de forego.
- xmlDocumentationStream
- Stream
Diffuser en continu la documentation XML de la compilation. Null pour la génération XML forego.
- win32Resources
- Stream
Diffuser en continu les ressources Win32 de la compilation (au format RES). Null pour indiquer qu’il n’y en a aucun. Le format RES commence par une entrée de ressource Null. Notez que l’appelant est responsable de la suppression de ce flux, le cas échéant.
- manifestResources
- IEnumerable<ResourceDescription>
Liste des ressources managées de la compilation. Null pour indiquer qu’il n’y en a aucun.
- options
- EmitOptions
Options d’émission.
- debugEntryPoint
- IMethodSymbol
Déboguer le point d’entrée de l’assembly. Le jeton de méthode est stocké dans le flux PDB généré.
Lorsqu’un programme démarre avec un débogueur attaché, le débogueur place le premier point d’arrêt au début de la méthode de point d’entrée de débogage. Le CLR démarre l’exécution de la méthode main statique de MainTypeName type. Lorsque le premier point d’arrêt atteint les étapes du débogueur, parcourez l’instruction de code par instruction jusqu’à ce que le code utilisateur soit atteint, en ignorant les méthodes marquées par DebuggerHiddenAttributeet en prenant en compte d’autres attributs de débogage.
Par défaut, les deux points d’entrée d’un programme exécutable (ConsoleApplication, WindowsApplication, WindowsRuntimeApplication) sont la même méthode (Main). Un programme non exécutable n’a aucun point d’entrée. Les runtimes qui implémentent un chargeur personnalisé peuvent spécifier le point d’entrée de débogage pour forcer le débogueur à ignorer la logique de chargeur personnalisé complexe s’exécutant au début du .exe et ainsi améliorer l’expérience de débogage.
Contrairement au point d’entrée ordinaire qui est limité à une méthode statique non générique d’une signature spécifique, il n’existe aucune restriction sur la debugEntryPoint
méthode autre que d’avoir un corps de méthode (extern, interface ou méthodes abstraites ne sont pas autorisées).
- sourceLinkStream
- Stream
Flux contenant des informations liant la compilation à un contrôle de code source.
- embeddedTexts
- IEnumerable<EmbeddedText>
Textes à incorporer dans la base de données PDB. Prise en charge uniquement lors de l’émission de PDB portables.
- metadataPEStream
- Stream
Diffuser en continu la sortie des métadonnées uniquement.
- cancellationToken
- CancellationToken
Pour annuler le processus d’émission.