Show / Hide Table of Contents

Interface ITypeInfo

Represents type information not covered by standard reflection.

Namespace: CilTools.Reflection
Assembly: CilTools.BytecodeAnalysis.dll
Syntax
public interface ITypeInfo
Remarks

This interface exposes the information applicable to types in signatures (such as a method signature), not to type definitions. For example, it enables you to programmatically inspect function pointer types, which is currently (as of .NET 5) not supported by the standard reflection implementation.

Some APIs in CilTools.Metadata, such as ParameterInfo.ParameterType from methods loaded using this library, could return System.Type instances that implements this interface. Cast them to the interface using is/as C# operators and use properties to get the information you need.

Properties

IsFunctionPointer

Gets a value indicating whether the type represents a function pointer

Declaration
bool IsFunctionPointer { get; }
Property Value
Type Description
System.Boolean

Modifiers

Enumerates custom modifiers associated with the type

Declaration
IEnumerable<CustomModifier> Modifiers { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<CustomModifier>

TargetSignature

Gets the target function signature, if the type represents a function pointer. Otherwise, returns null.

Declaration
Signature TargetSignature { get; }
Property Value
Type Description
Signature
Back to top CIL Tools (published from sources in GitHub repository).
Generated by DocFX