namespace WoofWare.PawPrint
open System.Reflection.Metadata
///
/// Represents a custom attribute applied to a type, method, field, or other metadata entity.
/// This is a strongly-typed representation of CustomAttribute from System.Reflection.Metadata.
///
type CustomAttribute =
{
///
/// The metadata token handle that uniquely identifies this custom attribute in the assembly.
///
Handle : CustomAttributeHandle
///
/// The constructor method used to create this custom attribute instance.
/// This token references the method that constructs the attribute.
///
Constructor : MetadataToken
}
[]
module CustomAttribute =
let make (handle : CustomAttributeHandle) (attr : System.Reflection.Metadata.CustomAttribute) : CustomAttribute =
let ctor = attr.Constructor |> MetadataToken.ofEntityHandle
{
Handle = handle
Constructor = ctor
}