Namespace AsmLocator

Classes

AssemblyLocator

Lookup naming conventions:

  • FindX returns the first match or null.
  • FindXs lazily enumerates all matches.
  • GetX requires exactly one match and throws MemberNotFoundException otherwise.
  • EditX resolves one match and invokes an edit callback.

FindXs searches every type that matches the TypeSpec, whereas GetX, EditX and the CIL helpers first require the TypeSpec to resolve to exactly one type. A broad TypeSpec therefore works with FindX but makes GetX throw an ambiguity error even when only one of the matched types contains the requested member.

EventSpec

Describes constraints used to match an event definition.

FieldSpec

Describes constraints used to match a field definition.

InstructionSequence

Represents a contiguous sequence of CIL instructions matching an instruction pattern.

InstructionSpec

Describes constraints for a CIL instruction. An empty specification matches every instruction and can be used as a one-instruction wildcard inside a pattern.

LocalSpec

Describes constraints used to match a CIL local variable.

LocatorExtensions

Provides lookup operations directly on AsmResolver objects without creating an AssemblyLocator. For example: typeDef.FindMethod(MethodSpec.ByName("Execute")).

MemberNotFoundException

Thrown when a Get* or Edit* lookup finds no match, finds more than one match, or reaches a member that has no CIL body or no requested accessor.

MethodSpec

Describes constraints used to match a method definition, including its signature and optional body contents.

ParameterSpec

Describes constraints used to match a method parameter.

PropertySpec

Describes constraints used to match a property definition.

StringMatcher

Represents a reusable string-matching strategy. Implicit conversion from string uses exact matching unless the value contains * or ?, in which case wildcard matching is used. Use FromRegex(string, RegexOptions) or Where(Func<string, bool>, string) for regular expressions or custom predicates.

TypeSpec

Describes constraints used to match a type definition.

Structs

InstructionMatch

Represents a matched instruction and its index in the method instruction collection at search time.

Enums

EventAccessor

Identifies the event accessor method to retrieve.

PropertyAccessor

Identifies the property accessor method to retrieve.