mirror of
https://github.com/Smaug123/WoofWare.PawPrint
synced 2025-10-14 10:08:40 +00:00
WIP
This commit is contained in:
@@ -34,6 +34,10 @@ type FieldInfo<'typeGeneric, 'fieldGeneric when 'typeGeneric : comparison and 't
|
||||
/// literal, and other characteristics.
|
||||
/// </summary>
|
||||
Attributes : FieldAttributes
|
||||
|
||||
/// Static fields don't have an offset at all; also, instance fields which don't have an explicit offset (but
|
||||
/// which of course do have one implicitly, which is most fields) are None here.
|
||||
Offset : int option
|
||||
}
|
||||
|
||||
member this.HasFieldRVA = this.Attributes.HasFlag FieldAttributes.HasFieldRVA
|
||||
@@ -62,12 +66,18 @@ module FieldInfo =
|
||||
let declaringType =
|
||||
ConcreteType.make' assembly declaringType declaringTypeNamespace declaringTypeName typeGenerics
|
||||
|
||||
let offset =
|
||||
match def.GetOffset () with
|
||||
| -1 -> None
|
||||
| s -> Some s
|
||||
|
||||
{
|
||||
Name = name
|
||||
Signature = fieldSig
|
||||
DeclaringType = declaringType
|
||||
Handle = handle
|
||||
Attributes = def.Attributes
|
||||
Offset = offset
|
||||
}
|
||||
|
||||
let mapTypeGenerics<'a, 'b, 'field
|
||||
@@ -84,5 +94,5 @@ module FieldInfo =
|
||||
DeclaringType = declaringType
|
||||
Signature = input.Signature
|
||||
Attributes = input.Attributes
|
||||
|
||||
Offset = input.Offset
|
||||
}
|
||||
|
Reference in New Issue
Block a user