[Home] Type Microsoft.FSharp.Reflection.FSharpValue


Full Type Signature

[<AbstractClassAttribute (); SealedAttribute ()>]
type FSharpValue =
  class
    static member GetRecordField : record:obj * info:PropertyInfo -> obj
    static member GetRecordFields : record:obj * ?bindingFlags:BindingFlags -> obj []
    static member GetTupleField : tuple:obj * index:int -> obj
    static member GetTupleFields : tuple:obj -> obj []
    static member GetUnionFields : obj:obj * typ:Type * ?bindingFlags:BindingFlags -> UnionCaseInfo * obj []
    static member MakeFunction : typ:Type * impl:(obj -> obj) -> obj
    static member MakeRecord : typ:Type * values:obj [] * ?bindingFlags:BindingFlags -> obj
    static member MakeTuple : tupleElements:obj [] * typ:Type -> obj
    static member MakeUnion : unioncase:UnionCaseInfo * args:obj [] * ?bindingFlags:BindingFlags -> obj
    static member PrecomputeRecordConstructor : typ:Type * ?bindingFlags:BindingFlags -> (obj [] -> obj)
    static member PrecomputeRecordConstructorInfo : typ:Type * ?bindingFlags:BindingFlags -> ConstructorInfo
    static member PrecomputeRecordFieldReader : info:PropertyInfo -> (obj -> obj)
    static member PrecomputeRecordReader : typ:Type * ?bindingFlags:BindingFlags -> (obj -> obj [])
    static member PrecomputeTupleConstructor : typ:Type -> (obj [] -> obj)
    static member PrecomputeTupleConstructorInfo : typ:Type -> ConstructorInfo * Type option
    static member PrecomputeTuplePropertyInfo : typ:Type * int -> PropertyInfo * (Type * int) option
    static member PrecomputeTupleReader : typ:Type -> (obj -> obj [])
    static member PrecomputeUnionConstructor : unionCase:UnionCaseInfo * ?bindingFlags:BindingFlags -> (obj [] -> obj)
    static member PrecomputeUnionConstructorInfo : unionCase:UnionCaseInfo * ?bindingFlags:BindingFlags -> MethodInfo
    static member PrecomputeUnionReader : unionCase:UnionCaseInfo * ?bindingFlags:BindingFlags -> (obj -> obj [])
    static member PrecomputeUnionTagMemberInfo : typ:Type * ?bindingFlags:BindingFlags -> MemberInfo
    static member PrecomputeUnionTagReader : typ:Type * ?bindingFlags:BindingFlags -> (obj -> int)
  end

Static Members

MemberDescription
member GetRecordField : record:obj * info:PropertyInfo -> obj
Read a field from a record value Assumes the given input is a record value. If not, ArgumentException is raised.
member GetRecordFields : record:obj * ?bindingFlags:BindingFlags -> obj []
Read all the fields from a record value Assumes the given input is a record value. If not, ArgumentException is raised.
member GetTupleField : tuple:obj * index:int -> obj
member GetTupleFields : tuple:obj -> obj []
member
  GetUnionFields : obj:obj * typ:Type * ?bindingFlags:BindingFlags ->
                   UnionCaseInfo * obj []
Identify the union case and its fields for an object Assumes the given input is a union case value. If not, ArgumentException is raised. If the type is not given, then the runtime type of the input object is used to identify the relevant union type. The type should always be given if the input object may be null. For example, option values may be represented using the 'null'.
member MakeFunction : typ:Type * impl:(obj -> obj) -> obj
member MakeRecord : typ:Type * values:obj [] * ?bindingFlags:BindingFlags -> obj
Create an instance of a record type Assumes the given input is a record type. If not, ArgumentException is raised.
member MakeTuple : tupleElements:obj [] * typ:Type -> obj
member
  MakeUnion : unioncase:UnionCaseInfo * args:obj [] * ?bindingFlags:BindingFlags
              -> obj
Create a union case value
member
  PrecomputeRecordConstructor : typ:Type * ?bindingFlags:BindingFlags ->
                                (obj [] -> obj)
Precompute a function for constructing a record value. Assumes the given type is a RecordType. If not, ArgumentException is raised during pre-computation.
member
  PrecomputeRecordConstructorInfo : typ:Type * ?bindingFlags:BindingFlags ->
                                    ConstructorInfo
Get a ConstructorInfo for a record type
member PrecomputeRecordFieldReader : info:PropertyInfo -> (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, ArgumentException is raised during pre-computation. Using the computed function will typically be 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.
member
  PrecomputeRecordReader : typ:Type * ?bindingFlags:BindingFlags ->
                           (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, ArgumentException is raised during pre-computation. Using the computed function will typically be 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.
member PrecomputeTupleConstructor : typ:Type -> (obj [] -> obj)
Precompute a function for reading the values of a particular tuple type Assumes the given type is a TupleType. If not, ArgumentException is raised during pre-computation.
member
  PrecomputeTupleConstructorInfo : typ:Type -> ConstructorInfo * Type option
Get a method that constructs objects of the given tuple type. For small tuples, no additional typoe will be returned. For large tuples, an additional type is returned indicating that a nested encoding has been used for the tuple type. In this case the suffix portion of the tuple type has the given type and an object of this type must be created and passed as the last argument to the ConstructorInfo. A recursive call to PrecomputeTupleConstructorInfo can be used to determine the constructor for that the suffix type.
member
  PrecomputeTuplePropertyInfo : typ:Type * int ->
                                PropertyInfo * (Type * int) option
Get information that indicates how to read a field of a tuple
member PrecomputeTupleReader : typ:Type -> (obj -> obj [])
Precompute a function for reading the values of a particular tuple type Assumes the given type is a TupleType. If not, ArgumentException is raised during pre-computation.
member
  PrecomputeUnionConstructor : unionCase:UnionCaseInfo *
                               ?bindingFlags:BindingFlags -> (obj [] -> obj)
Precompute a function for constructing a discriminated union value for a particular union case.
member
  PrecomputeUnionConstructorInfo : unionCase:UnionCaseInfo *
                                   ?bindingFlags:BindingFlags -> MethodInfo
A method that constructs objects of the given case
member
  PrecomputeUnionReader : unionCase:UnionCaseInfo * ?bindingFlags:BindingFlags
                          -> (obj -> obj [])
Precompute a function for reading all the fields for a particular discriminator case of a union type Using the computed function will typically be faster than executing a corresponding call to GetFields
member
  PrecomputeUnionTagMemberInfo : typ:Type * ?bindingFlags:BindingFlags ->
                                 MemberInfo
Precompute a property or static method for reading an integer representing the case tag of a union type.
member
  PrecomputeUnionTagReader : typ:Type * ?bindingFlags:BindingFlags ->
                             (obj -> int)
Precompute a function for reading an integer representing the case tag of a union type. Assumes the given type is a union type. If not, ArgumentException is raised during pre-computation. Using the computed function is more efficient than calling GetUnionCase 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.

See Also

Microsoft.FSharp.Reflection


Documentation for assembly FSharp.Core, version 1.9.6.0, generated using F# Programming Language version 1.9.6.0