Class SerializedAssemblyDefinition
- Namespace
- AsmResolver.DotNet.Serialized
- Assembly
- AsmResolver.DotNet.dll
Represents a lazily initialized implementation of AssemblyDefinition that is read from a .NET metadata image.
public class SerializedAssemblyDefinition : AssemblyDefinition, IHasCustomAttribute, IFullNameProvider, INameProvider, IImportable, IModuleProvider, IHasSecurityDeclaration, IMetadataMember
- Inheritance
-
SerializedAssemblyDefinition
- Implements
- Inherited Members
- Extension Methods
Constructors
SerializedAssemblyDefinition(ModuleReaderContext, MetadataToken, in AssemblyDefinitionRow, SerializedModuleDefinition)
Creates an assembly definition from an assembly metadata row.
public SerializedAssemblyDefinition(ModuleReaderContext context, MetadataToken token, in AssemblyDefinitionRow row, SerializedModuleDefinition manifestModule)
Parameters
context
ModuleReaderContextThe reader context.
token
MetadataTokenThe token to initialize the assembly for.
row
AssemblyDefinitionRowThe metadata table row to base the assembly definition on.
manifestModule
SerializedModuleDefinitionThe instance containing the manifest module definition.
Methods
GetCulture()
Obtains the locale string of the assembly definition.
protected override Utf8String? GetCulture()
Returns
- Utf8String
The locale string.
Remarks
This method is called upon initializing the Culture property.
GetCustomAttributes()
Obtains the list of custom attributes assigned to the member.
protected override IList<CustomAttribute> GetCustomAttributes()
Returns
- IList<CustomAttribute>
The attributes
Remarks
This method is called upon initialization of the CustomAttributes property.
GetModules()
Obtains the list of defined modules in the .NET assembly.
protected override IList<ModuleDefinition> GetModules()
Returns
- IList<ModuleDefinition>
The modules.
Remarks
This method is called upon initializing the Modules and/or ManifestModule property.
GetName()
Obtains the name of the assembly definition.
protected override Utf8String? GetName()
Returns
- Utf8String
The name.
Remarks
This method is called upon initializing the Name property.
GetPublicKey()
Obtains the public key of the assembly definition.
protected override byte[]? GetPublicKey()
Returns
- byte[]
The public key.
Remarks
This method is called upon initializing the PublicKey property.
GetSecurityDeclarations()
Obtains the list of security declarations assigned to the member.
protected override IList<SecurityDeclaration> GetSecurityDeclarations()
Returns
- IList<SecurityDeclaration>
The security declarations
Remarks
This method is called upon initialization of the SecurityDeclarations property.
TryGetTargetFramework(out DotNetRuntimeInfo)
Attempts to extract the target runtime from the TryGetTargetFramework(out DotNetRuntimeInfo) attribute.
public override bool TryGetTargetFramework(out DotNetRuntimeInfo info)
Parameters
info
DotNetRuntimeInfoThe runtime.
Returns
- bool
true
if the attribute was found and the runtime was extracted,false
otherwise.