Table of Contents

Class SerializedGenericParameterConstraint

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

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

public class SerializedGenericParameterConstraint : GenericParameterConstraint, IHasCustomAttribute, IMetadataMember, IModuleProvider, IOwnedCollectionElement<GenericParameter>
Inheritance
SerializedGenericParameterConstraint
Implements
Inherited Members
Extension Methods

Constructors

SerializedGenericParameterConstraint(ModuleReaderContext, MetadataToken, in GenericParameterConstraintRow)

Creates a generic parameter constraint from a generic parameter constraint metadata row.

public SerializedGenericParameterConstraint(ModuleReaderContext context, MetadataToken token, in GenericParameterConstraintRow row)

Parameters

context ModuleReaderContext

The reader context.

token MetadataToken

The token to initialize the constraint for.

row GenericParameterConstraintRow

The metadata table row to base the constraint on.

Methods

GetConstraint()

Obtains the type that the generic parameter was constrained to.

protected override ITypeDefOrRef? GetConstraint()

Returns

ITypeDefOrRef

The type.

Remarks

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

GetOwner()

Obtains the generic parameter that was constrained.

protected override GenericParameter? GetOwner()

Returns

GenericParameter

The generic parameter

Remarks

This method is called upon initialization of the Owner property.