Class MetadataReaderExtensions
Provides some useful extension methods to MetadataReader.
Inherited Members
Namespace: Alphaleonis.Reflection.Metadata
Assembly: Alphaleonis.Reflection.Metadata.dll
Syntax
public static class MetadataReaderExtensions
Methods
| Improve this Doc View SourceParseAssemblyName(MetadataReader, AssemblyDefinition)
Gets the AssemblyName of the given AssemblyDefinition.
Declaration
public static AssemblyName ParseAssemblyName(this MetadataReader metadataReader, AssemblyDefinition assemblyDefinition)
Parameters
| Type | Name | Description |
|---|---|---|
| MetadataReader | metadataReader | The MetadataReader to act on. |
| AssemblyDefinition | assemblyDefinition | The assembly definition. |
Returns
| Type | Description |
|---|---|
| AssemblyName | An AssemblyName representing the specified |
Remarks
This is similar to the AssemblyDefinition.GetAssemblyName from System.Reflection.Metadata, with the difference that
this method will give set culture to neutral and the public key token to null instead of
leaving them empty.
ParseAssemblyName(MetadataReader, AssemblyReference)
Gets the AssemblyName of the given AssemblyReference.
Declaration
public static AssemblyName ParseAssemblyName(this MetadataReader metadataReader, AssemblyReference assemblyReference)
Parameters
| Type | Name | Description |
|---|---|---|
| MetadataReader | metadataReader | The MetadataReader to act on. |
| AssemblyReference | assemblyReference | The assembly reference. |
Returns
| Type | Description |
|---|---|
| AssemblyName | An AssemblyName representing the specified |
Remarks
This is similar to the AssemblyDefinition.GetAssemblyName from System.Reflection.Metadata, with the difference that
this method will give set culture to neutral and the public key token to null instead of
leaving them empty.