Skip to content

IlNavigationResolver

Namespace: Dotsider.Core.Analysis

Assembly: Dotsider.Core.dll

Resolves a metadata token from an IL instruction to an IlNavigationTarget describing what the token points to and where it lives.

public static class IlNavigationResolver

Object → IlNavigationResolver

Resolve(AssemblyAnalyzer, int, MethodDefInfo?)

Section titled “Resolve(AssemblyAnalyzer, int, MethodDefInfo?)”

Resolves the given metadata token against the analyzer’s metadata tables.

Parameters:

  • analyzer (AssemblyAnalyzer): The assembly analyzer containing the metadata.
  • token (Int32): The raw metadata token from an IL instruction operand.
  • contextMethod (MethodDefInfo): The method whose IL body produced the token, when known. Needed to resolve bare generic-parameter TypeSpecs (ELEMENT_TYPE_VAR/ELEMENT_TYPE_MVAR), which do not encode their generic owner on their own.

Returns: IlNavigationTarget

The resolved navigation target.

public static IlNavigationTarget Resolve(AssemblyAnalyzer analyzer, int token, MethodDefInfo? contextMethod = null)