Table of Contents

Class MethodSemantics

Namespace
AsmResolver.DotNet
Assembly
AsmResolver.DotNet.dll

Represents an object that associates a method definition to a property or an event.

public class MethodSemantics : MetadataMember, IMetadataMember, IOwnedCollectionElement<IHasSemantics>
Inheritance
MethodSemantics
Implements
Derived
Inherited Members

Constructors

MethodSemantics(MethodDefinition?, MethodSemanticsAttributes)

Creates a new method semantics object.

public MethodSemantics(MethodDefinition? method, MethodSemanticsAttributes attributes)

Parameters

method MethodDefinition

The method to give special semantics.

attributes MethodSemanticsAttributes

The type of semantics to assign.

MethodSemantics(MetadataToken)

Initializes an empty method semantics object.

protected MethodSemantics(MetadataToken token)

Parameters

token MetadataToken

The metadata token of the semantics object.

Properties

Association

Gets or sets the member that the method is associated to.

public IHasSemantics? Association { get; }

Property Value

IHasSemantics

Attributes

Gets or sets the type of semantics that are associated to the method.

public MethodSemanticsAttributes Attributes { get; set; }

Property Value

MethodSemanticsAttributes

Method

Gets or sets the method that is given special semantics.

public MethodDefinition? Method { get; }

Property Value

MethodDefinition

Methods

GetAssociation()

Obtains the member that the method is association to.

protected virtual IHasSemantics? GetAssociation()

Returns

IHasSemantics

The member

Remarks

This method is called upon initialization of the Association property.

GetMethod()

Obtains the method that was given special semantics.

protected virtual MethodDefinition? GetMethod()

Returns

MethodDefinition

The method

Remarks

This method is called upon initialization of the Method property.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.