Class SignatureContext
Encapsulates data that identifies the meaning of the signature in some context
Inheritance
Inherited Members
Namespace: CilTools.Reflection
Assembly: CilTools.BytecodeAnalysis.dll
Syntax
public class SignatureContext
Remarks
Some ECMA-335 signature elements, such as class references or generic parameters, require additional data to be mapped into the concrete types. Signature context holds such data, for example, a metadata token resolver or a generic context.
Properties
GenericContext
Gets a generic context object
Declaration
public GenericContext GenericContext { get; }
Property Value
Type | Description |
---|---|
GenericContext |
GenericDefinition
Gets a generic method definition, if the signature is for a generic method instantiation
Declaration
public MethodBase GenericDefinition { get; }
Property Value
Type | Description |
---|---|
System.Reflection.MethodBase |
TokenResolver
Gets the token resolver object
Declaration
public ITokenResolver TokenResolver { get; }
Property Value
Type | Description |
---|---|
ITokenResolver |
Methods
Create(ITokenResolver, GenericContext, MethodBase)
Creates a new signature context instance
Declaration
public static SignatureContext Create(ITokenResolver tokenResolver, GenericContext genericContext, MethodBase genericDefinition)
Parameters
Type | Name | Description |
---|---|---|
ITokenResolver | tokenResolver | Metadata tokens resolver |
GenericContext | genericContext | Generic context |
System.Reflection.MethodBase | genericDefinition | Generic method definition, if the signature is for a generic method instantiation, or null otherwise |
Returns
Type | Description |
---|---|
SignatureContext |
Remarks
The genericDefinition
parameter only needs to be specified when reading a signature of generic method instantiation
(from MethodSpec metadata table), NOT for every generic method signature.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Token resolver is null |