namespace WoofWare.PawPrint
open System.Reflection
open System.Reflection.Metadata
///
/// Represents a type specification in assembly metadata.
/// Type specifications describe complex types like generic instantiations,
/// arrays, pointers, and other composite types.
///
type TypeSpec =
{
///
/// The metadata token handle that uniquely identifies this type specification.
///
Handle : TypeSpecificationHandle
///
/// The full type definition/signature of this type specification.
/// This contains all the details about the composite type structure.
///
Signature : TypeDefn
}
[]
module TypeSpec =
let make (assembly : AssemblyName) (handle : TypeSpecificationHandle) (r : TypeSpecification) : TypeSpec =
let spec = r.DecodeSignature (TypeDefn.typeProvider assembly, ())
{
Handle = handle
Signature = spec
}