[Home] Module Microsoft.FSharp.Reflection.Value


Values

ValueDescription
val GetInfo : 'a -> ValueInfo
Get the reflective view of a value
val GetRecordConstructor : Type -> (obj [] -> obj)
Precompute a function for constructing a record value. Assumes the given type is a RecordType. If not an unspecified exception is raised during pre-computation.
val GetRecordFieldReader : Type * string -> (obj -> obj)
Precompute a function for reading a particular field from a record. Assumes the given type is a RecordType with a field of the given name. If not an unspecified exception is raised during pre-computation. Using the computed function will be much faster than executing a corresponding call to Value.GetInfo because the path executed by the computed function is optimized given the knowledge that it will be used to read values of the given type.
val GetRecordReader : Type -> (obj -> obj [])
Precompute a function for reading all the fields from a record. The fields are returned in the same order as the fields reported by a call to Microsoft.FSharp.Reflection.Type.GetInfo for this type. Assumes the given type is a RecordType. If not an unspecified exception is raised during pre-computation. Using the computed function will be much faster than executing a corresponding call to Value.GetInfo because the path executed by the computed function is optimized given the knowledge that it will be used to read values of the given type.
val GetSumConstructor : Type * int -> (obj [] -> obj)
Precompute a function for constructing a discriminated union value for a particular tag. Assumes the given type is a SumType where the tag is a legitimate tag for the type. If not an unspecified exception is raised during pre-computation.
val GetSumRecordReader : Type * int -> (obj -> obj [])
Precompute a function for reading all the fields for a particular discriminator tag of a sum type Assumes the given type is a SumType where the tag is a legitimate tag for the type. If not an unspecified exception is raised during pre-computation. Tags can be mapped to and from names using the functions returned by GetSumTagConverters Using the computed function will be much faster than executing a corresponding call to Value.GetInfo because the path executed by the computed function is optimized given the knowledge that it will be used to read values of the given type.
val GetSumTagConverters : Type -> int * (int -> string) * (string -> int)
Precompute a pair of functions for converting between integer discriminator tags the names of the discriminators for the given sum type. Assumes the given type is a SumType. If not an unspecified exception is raised during pre-computation.
val GetSumTagReader : Type -> (obj -> int)
Precompute a function for reading an integer representing the discriminator tag of a sum type. Assumes the given type is a SumType. If not an unspecified exception is raised during pre-computation. Using the computed function will be much faster than executing a corresponding call to Value.GetInfo because the path executed by the computed function is optimized given the knowledge that it will be used to read values of the given type.
val GetTupleConstructor : Type -> (obj [] -> obj)
Precompute a function for reading the values of a particular tuple type Assumes the given type is a TupleType. If not an unspecified exception is raised during pre-computation.
val GetTupleReader : Type -> (obj -> obj [])
Precompute a function for reading the values of a particular tuple type Assumes the given type is a TupleType. If not an unspecified exception is raised during pre-computation.
val GetType : 'a -> Type
Get the reified F# type of the value. This will often be less specific than obj.GetType().
val GetTypeInfo : 'a -> TypeInfo

See Also

Microsoft.FSharp.Reflection


Documentation for assembly FSharp.Core, version 1.9.4.19, generated using F# version 1.9.4.19