mirror of
https://github.com/Smaug123/WoofWare.PawPrint
synced 2025-10-05 06:08:39 +00:00
34 lines
1.0 KiB
Forth
34 lines
1.0 KiB
Forth
namespace WoofWare.PawPrint
|
|
|
|
open System.Reflection
|
|
open System.Reflection.Metadata
|
|
|
|
/// <summary>
|
|
/// Represents a type specification in assembly metadata.
|
|
/// Type specifications describe complex types like generic instantiations,
|
|
/// arrays, pointers, and other composite types.
|
|
/// </summary>
|
|
type TypeSpec =
|
|
{
|
|
/// <summary>
|
|
/// The metadata token handle that uniquely identifies this type specification.
|
|
/// </summary>
|
|
Handle : TypeSpecificationHandle
|
|
|
|
/// <summary>
|
|
/// The full type definition/signature of this type specification.
|
|
/// This contains all the details about the composite type structure.
|
|
/// </summary>
|
|
Signature : TypeDefn
|
|
}
|
|
|
|
[<RequireQualifiedAccess>]
|
|
module TypeSpec =
|
|
let make (assembly : AssemblyName) (handle : TypeSpecificationHandle) (r : TypeSpecification) : TypeSpec =
|
|
let spec = r.DecodeSignature (TypeDefn.typeProvider assembly, ())
|
|
|
|
{
|
|
Handle = handle
|
|
Signature = spec
|
|
}
|