Reflection.FSharpValue Class (F#)

Contains operations associated with constructing and analyzing values associated with F# types such as records, unions and tuples.

Namespace/Module Path: Microsoft.FSharp.Reflection

Assembly: FSharp.Core (in FSharp.Core.dll)

[<AbstractClass>]
[<Sealed>]
type FSharpValue =
 class
  static member GetExceptionFields : obj * ?BindingFlags -> obj []
  static member GetRecordField : obj * PropertyInfo -> obj
  static member GetRecordFields : obj * ?BindingFlags -> obj []
  static member GetTupleField : obj * int -> obj
  static member GetTupleFields : obj -> obj []
  static member GetUnionFields : obj * Type * ?BindingFlags -> UnionCaseInfo * obj []
  static member MakeFunction : Type * (obj -> obj) -> obj
  static member MakeRecord : Type * obj [] * ?BindingFlags -> obj
  static member MakeTuple : obj [] * Type -> obj
  static member MakeUnion : UnionCaseInfo * obj [] * ?BindingFlags -> obj
  static member PreComputeRecordConstructor : Type * ?BindingFlags -> obj [] -> obj
  static member PreComputeRecordConstructorInfo : Type * ?BindingFlags -> ConstructorInfo
  static member PreComputeRecordFieldReader : PropertyInfo -> obj -> obj
  static member PreComputeRecordReader : Type * ?BindingFlags -> obj -> obj []
  static member PreComputeTupleConstructor : Type -> obj [] -> obj
  static member PreComputeTupleConstructorInfo : Type -> ConstructorInfo * Type option
  static member PreComputeTuplePropertyInfo : Type * int -> PropertyInfo * Type * int option
  static member PreComputeTupleReader : Type -> obj -> obj []
  static member PreComputeUnionConstructor : UnionCaseInfo * ?BindingFlags -> obj [] -> obj
  static member PreComputeUnionConstructorInfo : UnionCaseInfo * ?BindingFlags -> MethodInfo
  static member PreComputeUnionReader : UnionCaseInfo * ?BindingFlags -> obj -> obj []
  static member PreComputeUnionTagMemberInfo : Type * ?BindingFlags -> MemberInfo
  static member PreComputeUnionTagReader : Type * ?BindingFlags -> obj -> int
 end

Static Members

Member

Description

GetExceptionFields

Reads all the fields from a value built using an instance of an F# exception declaration.

GetRecordField

Reads a field from a record value.

GetRecordFields

Reads all the fields from a record value.

GetTupleField

Reads a field from a tuple value.

GetTupleFields

Reads all fields from a tuple.

GetUnionFields

Identify the union case and its fields for an object.

MakeFunction

Creates a typed function from object from a dynamic function implementation.

MakeRecord

Creates an instance of a record type.

MakeTuple

Creates an instance of a tuple type.

MakeUnion

Create a union case value.

PreComputeRecordConstructor

Precompute a function for constructing a record value.

PreComputeRecordConstructorInfo

Get a ConstructorInfo for a record type.

PreComputeRecordFieldReader

Precompute a function for reading a particular field from a record.

PreComputeRecordReader

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.

PreComputeTupleConstructor

Precomputes a function for reading the values of a particular tuple type.

PreComputeTupleConstructorInfo

Gets a method that constructs objects of the given tuple type. For small tuples, no additional type will be returned.

PreComputeTuplePropertyInfo

Gets information that indicates how to read a field of a tuple.

PreComputeTupleReader

Precomputes a function for reading the values of a particular tuple type.

PreComputeUnionConstructor

Precomputes a function for constructing a discriminated union value for a particular union case.

PreComputeUnionConstructorInfo

A method that constructs objects of the given case.

PreComputeUnionReader

Precomputes a function for reading all the fields for a particular discriminator case of a union type.

PreComputeUnionTagMemberInfo

Precomputes a property or static method for reading an integer representing the case tag of a union type.

PreComputeUnionTagReader

Precomputes a function that reads the tags of a union type.

Platforms

Windows 8, Windows 7, Windows Server 2012, Windows Server 2008 R2

Version Information

F# Core Library Versions

Supported in: 2.0, 4.0, Portable

See Also

Reference

Microsoft.FSharp.Reflection Namespace (F#)