mirror of
https://github.com/Smaug123/WoofWare.PawPrint
synced 2025-10-07 23:18:41 +00:00
28 lines
798 B
Forth
28 lines
798 B
Forth
namespace WoofWare.PawPrint
|
|
|
|
open System.Reflection.Metadata
|
|
|
|
type FieldInfo =
|
|
{
|
|
Handle : FieldDefinitionHandle
|
|
Name : string
|
|
DeclaringType : TypeDefinitionHandle
|
|
Signature : TypeDefn
|
|
Attributes : System.Reflection.FieldAttributes
|
|
}
|
|
|
|
[<RequireQualifiedAccess>]
|
|
module FieldInfo =
|
|
let make (getString : StringHandle -> string) (handle : FieldDefinitionHandle) (def : FieldDefinition) : FieldInfo =
|
|
let name = getString def.Name
|
|
let fieldSig = def.DecodeSignature (TypeDefn.typeProvider, ())
|
|
let declaringType = def.GetDeclaringType ()
|
|
|
|
{
|
|
Name = name
|
|
Signature = fieldSig
|
|
DeclaringType = declaringType
|
|
Handle = handle
|
|
Attributes = def.Attributes
|
|
}
|