Table of Contents

Class SerializedMethodDefinition

Namespace
AsmResolver.DotNet.Serialized
Assembly
AsmResolver.DotNet.dll

Represents a lazily initialized implementation of MethodDefinition that is read from a .NET metadata image.

public class SerializedMethodDefinition : MethodDefinition, IOwnedCollectionElement<TypeDefinition>, IMemberRefParent, IMethodDefOrRef, ICustomAttributeType, IMethodDescriptor, IHasCustomAttribute, IHasGenericParameters, IMemberForwarded, IMemberDefinition, IMemberDescriptor, IFullNameProvider, IModuleProvider, IImportable, IHasSecurityDeclaration, IMetadataDefinition, IManagedEntryPoint, IMetadataMember, INameProvider
Inheritance
SerializedMethodDefinition
Implements
Inherited Members
Extension Methods

Constructors

SerializedMethodDefinition(ModuleReaderContext, MetadataToken, in MethodDefinitionRow)

Creates a method definition from a method metadata row.

public SerializedMethodDefinition(ModuleReaderContext context, MetadataToken token, in MethodDefinitionRow row)

Parameters

context ModuleReaderContext

The reader context.

token MetadataToken

The token to initialize the method for.

row MethodDefinitionRow

The metadata table row to base the method definition on.

Properties

HasCustomAttributes

Gets a value indicating whether the member is assigned custom attributes.

public override bool HasCustomAttributes { get; }

Property Value

bool

HasGenericParameters

Gets a value indicating whether the member defines generic parameters.

public override bool HasGenericParameters { get; }

Property Value

bool

HasParameterDefinitions

Gets a value indicating whether the method defines parameter definitions.

public override bool HasParameterDefinitions { get; }

Property Value

bool

Remarks

This property might not reflect the list of actual parameters that the method defines and uses according to the method signature. This property only reflects the list that is inferred from the ParamList column in the metadata row. For the actual list of parameters, use the Parameters property instead.

HasSecurityDeclarations

Gets a value indicating whether the member is assigned security declarations.

public override bool HasSecurityDeclarations { get; }

Property Value

bool

Methods

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.

GetDeclaringType()

Obtains the declaring type of the method definition.

protected override TypeDefinition? GetDeclaringType()

Returns

TypeDefinition

The declaring type.

Remarks

This method is called upon initialization of the DeclaringType property.

GetExportInfo()

Obtains the unmanaged export information associated to the method (if available).

protected override UnmanagedExportInfo? GetExportInfo()

Returns

UnmanagedExportInfo?

The export information or null if the method was not exported as a native symbol.

Remarks

This method is called upon initialization of the ExportInfo property.

GetGenericParameterCount()

Measures the number of generic parameters defined by this method.

protected override int GetGenericParameterCount()

Returns

int

The number of generic parameters.

GetGenericParameters()

Obtains the list of generic parameters this member declares.

protected override IList<GenericParameter> GetGenericParameters()

Returns

IList<GenericParameter>

The generic parameters

Remarks

This method is called upon initialization of the GenericParameters property.

GetImplementationMap()

Obtains the platform invoke information assigned to the method.

protected override ImplementationMap? GetImplementationMap()

Returns

ImplementationMap

The mapping.

Remarks

This method is called upon initialization of the ImplementationMap property.

GetMethodBody()

Obtains the body of the method definition.

protected override MethodBody? GetMethodBody()

Returns

MethodBody

The signature.

Remarks

This method is called upon initialization of the MethodBody property.

GetName()

Obtains the name of the method definition.

protected override Utf8String? GetName()

Returns

Utf8String

The name.

Remarks

This method is called upon initialization of the Name property.

GetParameterDefinitions()

Obtains the parameter definitions of the method definition.

protected override IList<ParameterDefinition> GetParameterDefinitions()

Returns

IList<ParameterDefinition>

The signature.

Remarks

This method is called upon initialization of the ParameterDefinitions 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.

GetSemantics()

Obtains the semantics associated to the method (if available).

protected override MethodSemantics? GetSemantics()

Returns

MethodSemantics

The semantics, or null if the method was not assigned semantics.

Remarks

This method is called upon initialization of the Semantics property.

GetSignature()

Obtains the signature of the method definition.

protected override MethodSignature? GetSignature()

Returns

MethodSignature

The signature.

Remarks

This method is called upon initialization of the Signature property.