-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFields.fsi
31 lines (24 loc) · 941 Bytes
/
Fields.fsi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
namespace ShapeSifter
open Microsoft.FSharp.Reflection
open System.Reflection
/// A field in a record or discriminated union.
[<NoComparison ; NoEquality>]
type TypeField<'case> =
{
/// The name of the field; for example, the name of this very field is "Name".
Name : string
/// Any attributes that were present on the field.
Attributes : CustomAttributeData list
/// The raw object that represents this field, obtained by reflection.
RawCase : 'case
}
/// A field in a record.
type RecordTypeField = TypeField<PropertyInfo>
/// A field in a discriminated union.
type UnionTypeField = TypeField<UnionCaseInfo>
[<RequireQualifiedAccess>]
module TypeField =
/// Get the Name contained in a TypeField.
val name<'case> : TypeField<'case> -> string
/// Get the Attributes contained in a TypeField.
val attributes<'case> : TypeField<'case> -> CustomAttributeData list