EmitBaseline.CreateInitialBaseline Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CreateInitialBaseline(ModuleMetadata, Func<MethodDefinitionHandle,EditAndContinueMethodDebugInformation>) |
Obsolete.
Creates an EmitBaseline from the metadata of the module before editing and from a function that maps from a method to an array of local names. |
CreateInitialBaseline(ModuleMetadata, Func<MethodDefinitionHandle, EditAndContinueMethodDebugInformation>, Func<MethodDefinitionHandle, StandaloneSignatureHandle>, Boolean) |
Obsolete.
Creates an EmitBaseline from the metadata of the module before editing and from a function that maps from a method to an array of local names. |
CreateInitialBaseline(Compilation, ModuleMetadata, Func<MethodDefinitionHandle, EditAndContinueMethodDebugInformation>, Func<MethodDefinitionHandle, StandaloneSignatureHandle>, Boolean) |
Creates an EmitBaseline from the metadata of the module before editing and from a function that maps from a method to an array of local names. |
CreateInitialBaseline(ModuleMetadata, Func<MethodDefinitionHandle,EditAndContinueMethodDebugInformation>)
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
Caution
This overload is no longer supported
Creates an EmitBaseline from the metadata of the module before editing and from a function that maps from a method to an array of local names.
public:
static Microsoft::CodeAnalysis::Emit::EmitBaseline ^ CreateInitialBaseline(Microsoft::CodeAnalysis::ModuleMetadata ^ module, Func<System::Reflection::Metadata::MethodDefinitionHandle, Microsoft::CodeAnalysis::Emit::EditAndContinueMethodDebugInformation> ^ debugInformationProvider);
public static Microsoft.CodeAnalysis.Emit.EmitBaseline CreateInitialBaseline (Microsoft.CodeAnalysis.ModuleMetadata module, Func<System.Reflection.Metadata.MethodDefinitionHandle,Microsoft.CodeAnalysis.Emit.EditAndContinueMethodDebugInformation> debugInformationProvider);
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[System.Obsolete("This overload is no longer supported", true)]
public static Microsoft.CodeAnalysis.Emit.EmitBaseline CreateInitialBaseline (Microsoft.CodeAnalysis.ModuleMetadata module, Func<System.Reflection.Metadata.MethodDefinitionHandle,Microsoft.CodeAnalysis.Emit.EditAndContinueMethodDebugInformation> debugInformationProvider);
static member CreateInitialBaseline : Microsoft.CodeAnalysis.ModuleMetadata * Func<System.Reflection.Metadata.MethodDefinitionHandle, Microsoft.CodeAnalysis.Emit.EditAndContinueMethodDebugInformation> -> Microsoft.CodeAnalysis.Emit.EmitBaseline
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
[<System.Obsolete("This overload is no longer supported", true)>]
static member CreateInitialBaseline : Microsoft.CodeAnalysis.ModuleMetadata * Func<System.Reflection.Metadata.MethodDefinitionHandle, Microsoft.CodeAnalysis.Emit.EditAndContinueMethodDebugInformation> -> Microsoft.CodeAnalysis.Emit.EmitBaseline
Public Shared Function CreateInitialBaseline (module As ModuleMetadata, debugInformationProvider As Func(Of MethodDefinitionHandle, EditAndContinueMethodDebugInformation)) As EmitBaseline
Parameters
- module
- ModuleMetadata
The metadata of the module before editing.
- debugInformationProvider
- Func<MethodDefinitionHandle,EditAndContinueMethodDebugInformation>
A function that for a method handle returns Edit and Continue debug information emitted by the compiler into the PDB. The function shall throw InvalidDataException if the debug information can't be read for the specified method. This exception and IOException are caught and converted to an emit diagnostic. Other exceptions are passed through.
Returns
An EmitBaseline for the module.
- Attributes
Exceptions
module
is not a PE image.
debugInformationProvider
is null.
Error reading module metadata.
Module metadata is invalid.
Module has been disposed.
Applies to
CreateInitialBaseline(ModuleMetadata, Func<MethodDefinitionHandle, EditAndContinueMethodDebugInformation>, Func<MethodDefinitionHandle, StandaloneSignatureHandle>, Boolean)
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
Caution
This overload is no longer supported
Creates an EmitBaseline from the metadata of the module before editing and from a function that maps from a method to an array of local names.
public:
static Microsoft::CodeAnalysis::Emit::EmitBaseline ^ CreateInitialBaseline(Microsoft::CodeAnalysis::ModuleMetadata ^ module, Func<System::Reflection::Metadata::MethodDefinitionHandle, Microsoft::CodeAnalysis::Emit::EditAndContinueMethodDebugInformation> ^ debugInformationProvider, Func<System::Reflection::Metadata::MethodDefinitionHandle, System::Reflection::Metadata::StandaloneSignatureHandle> ^ localSignatureProvider, bool hasPortableDebugInformation);
public static Microsoft.CodeAnalysis.Emit.EmitBaseline CreateInitialBaseline (Microsoft.CodeAnalysis.ModuleMetadata module, Func<System.Reflection.Metadata.MethodDefinitionHandle,Microsoft.CodeAnalysis.Emit.EditAndContinueMethodDebugInformation> debugInformationProvider, Func<System.Reflection.Metadata.MethodDefinitionHandle,System.Reflection.Metadata.StandaloneSignatureHandle> localSignatureProvider, bool hasPortableDebugInformation);
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[System.Obsolete("This overload is no longer supported", true)]
public static Microsoft.CodeAnalysis.Emit.EmitBaseline CreateInitialBaseline (Microsoft.CodeAnalysis.ModuleMetadata module, Func<System.Reflection.Metadata.MethodDefinitionHandle,Microsoft.CodeAnalysis.Emit.EditAndContinueMethodDebugInformation> debugInformationProvider, Func<System.Reflection.Metadata.MethodDefinitionHandle,System.Reflection.Metadata.StandaloneSignatureHandle> localSignatureProvider, bool hasPortableDebugInformation);
static member CreateInitialBaseline : Microsoft.CodeAnalysis.ModuleMetadata * Func<System.Reflection.Metadata.MethodDefinitionHandle, Microsoft.CodeAnalysis.Emit.EditAndContinueMethodDebugInformation> * Func<System.Reflection.Metadata.MethodDefinitionHandle, System.Reflection.Metadata.StandaloneSignatureHandle> * bool -> Microsoft.CodeAnalysis.Emit.EmitBaseline
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
[<System.Obsolete("This overload is no longer supported", true)>]
static member CreateInitialBaseline : Microsoft.CodeAnalysis.ModuleMetadata * Func<System.Reflection.Metadata.MethodDefinitionHandle, Microsoft.CodeAnalysis.Emit.EditAndContinueMethodDebugInformation> * Func<System.Reflection.Metadata.MethodDefinitionHandle, System.Reflection.Metadata.StandaloneSignatureHandle> * bool -> Microsoft.CodeAnalysis.Emit.EmitBaseline
Public Shared Function CreateInitialBaseline (module As ModuleMetadata, debugInformationProvider As Func(Of MethodDefinitionHandle, EditAndContinueMethodDebugInformation), localSignatureProvider As Func(Of MethodDefinitionHandle, StandaloneSignatureHandle), hasPortableDebugInformation As Boolean) As EmitBaseline
Parameters
- module
- ModuleMetadata
The metadata of the module before editing.
- debugInformationProvider
- Func<MethodDefinitionHandle,EditAndContinueMethodDebugInformation>
A function that for a method handle returns Edit and Continue debug information emitted by the compiler into the PDB. The function shall throw InvalidDataException if the debug information can't be read for the specified method. This exception and IOException are caught and converted to an emit diagnostic. Other exceptions are passed through.
- localSignatureProvider
- Func<MethodDefinitionHandle,StandaloneSignatureHandle>
A function that for a method handle returns the signature of its local variables. The function shall throw InvalidDataException if the information can't be read for the specified method. This exception and IOException are caught and converted to an emit diagnostic. Other exceptions are passed through.
- hasPortableDebugInformation
- Boolean
True if the baseline PDB is portable.
Returns
An EmitBaseline for the module.
- Attributes
Exceptions
localSignatureProvider
is null.
Error reading module metadata.
Module metadata is invalid.
Module has been disposed.
Remarks
Only the initial baseline is created using this method; subsequent baselines are created automatically when emitting the differences in subsequent compilations.
When an active method (one for which a frame is allocated on a stack) is updated the values of its local variables need to be preserved. The mapping of local variable names to their slots in the frame is not included in the metadata and thus needs to be provided by debugInformationProvider
.
The debugInformationProvider
is only needed for the initial generation. The mapping for the subsequent generations is carried over through EmitBaseline. The compiler assigns slots to named local variables (including named temporary variables) it the order in which they appear in the source code. This property allows the compiler to reconstruct the local variable mapping for the initial generation. A subsequent generation may add a new variable in between two variables of the previous generation. Since the slots of the previous generation variables need to be preserved the only option is to add these new variables to the end. The slot ordering thus no longer matches the syntax ordering. It is therefore necessary to pass Baseline to the next generation (rather than e.g. create new EmitBaselines from scratch based on metadata produced by subsequent compilations).
Applies to
CreateInitialBaseline(Compilation, ModuleMetadata, Func<MethodDefinitionHandle, EditAndContinueMethodDebugInformation>, Func<MethodDefinitionHandle, StandaloneSignatureHandle>, Boolean)
- Source:
- EmitBaseline.cs
- Source:
- EmitBaseline.cs
Creates an EmitBaseline from the metadata of the module before editing and from a function that maps from a method to an array of local names.
public static Microsoft.CodeAnalysis.Emit.EmitBaseline CreateInitialBaseline (Microsoft.CodeAnalysis.Compilation compilation, Microsoft.CodeAnalysis.ModuleMetadata module, Func<System.Reflection.Metadata.MethodDefinitionHandle,Microsoft.CodeAnalysis.Emit.EditAndContinueMethodDebugInformation> debugInformationProvider, Func<System.Reflection.Metadata.MethodDefinitionHandle,System.Reflection.Metadata.StandaloneSignatureHandle> localSignatureProvider, bool hasPortableDebugInformation);
static member CreateInitialBaseline : Microsoft.CodeAnalysis.Compilation * Microsoft.CodeAnalysis.ModuleMetadata * Func<System.Reflection.Metadata.MethodDefinitionHandle, Microsoft.CodeAnalysis.Emit.EditAndContinueMethodDebugInformation> * Func<System.Reflection.Metadata.MethodDefinitionHandle, System.Reflection.Metadata.StandaloneSignatureHandle> * bool -> Microsoft.CodeAnalysis.Emit.EmitBaseline
Public Shared Function CreateInitialBaseline (compilation As Compilation, module As ModuleMetadata, debugInformationProvider As Func(Of MethodDefinitionHandle, EditAndContinueMethodDebugInformation), localSignatureProvider As Func(Of MethodDefinitionHandle, StandaloneSignatureHandle), hasPortableDebugInformation As Boolean) As EmitBaseline
Parameters
- compilation
- Compilation
Initial Microsoft.CodeAnalysis.Emit.EmitBaseline.Compilation.
- module
- ModuleMetadata
The metadata of the module before editing.
- debugInformationProvider
- Func<MethodDefinitionHandle,EditAndContinueMethodDebugInformation>
A function that for a method handle returns Edit and Continue debug information emitted by the compiler into the PDB. The function shall throw InvalidDataException if the debug information can't be read for the specified method. This exception and IOException are caught and converted to an emit diagnostic. Other exceptions are passed through.
- localSignatureProvider
- Func<MethodDefinitionHandle,StandaloneSignatureHandle>
A function that for a method handle returns the signature of its local variables. The function shall throw InvalidDataException if the information can't be read for the specified method. This exception and IOException are caught and converted to an emit diagnostic. Other exceptions are passed through.
- hasPortableDebugInformation
- Boolean
True if the baseline PDB is portable.
Returns
An EmitBaseline for the module.
Exceptions
localSignatureProvider
is null.
Error reading module metadata.
Module metadata is invalid.
Module has been disposed.
Remarks
Only the initial baseline is created using this method; subsequent baselines are created automatically when emitting the differences in subsequent compilations.
When an active method (one for which a frame is allocated on a stack) is updated the values of its local variables need to be preserved. The mapping of local variable names to their slots in the frame is not included in the metadata and thus needs to be provided by debugInformationProvider
.
The debugInformationProvider
is only needed for the initial generation. The mapping for the subsequent generations is carried over through EmitBaseline. The compiler assigns slots to named local variables (including named temporary variables) it the order in which they appear in the source code. This property allows the compiler to reconstruct the local variable mapping for the initial generation. A subsequent generation may add a new variable in between two variables of the previous generation. Since the slots of the previous generation variables need to be preserved the only option is to add these new variables to the end. The slot ordering thus no longer matches the syntax ordering. It is therefore necessary to pass Baseline to the next generation (rather than e.g. create new EmitBaselines from scratch based on metadata produced by subsequent compilations).