Skip to content

Instantly share code, notes, and snippets.

@dsyme
Created August 1, 2020 03:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsyme/1b28a65cddf82aae10ac87eacf73943a to your computer and use it in GitHub Desktop.
Save dsyme/1b28a65cddf82aae10ac87eacf73943a to your computer and use it in GitHub Desktop.
class='parameter'>recordType</span></dt><dd><p>The type of record to construct.</p></dd><dt><span class='parameter'>bindingFlags</span></dt><dd><p>Optional binding flags.</p></dd></dl><p class='returns'><p>Returns: A function to construct records of the given type.</p><table class='inner-list exception-list'><tr><td><a href=\"https://docs.microsoft.com/dotnet/api/system.argumentexception\">ArgumentException</a></td><td>Thrown when the input type is not a record type.</td></tr></table>"
},
{
"uri": "https://fsharp.github.io/fsharp-core-api-docs/reference/fsharp-reflection-fsharpvalue.html#PreComputeRecordConstructorInfo",
"title": "FSharpValue.PreComputeRecordConstructorInfo",
"content": "FSharpValue.PreComputeRecordConstructorInfo \nPreComputeRecordConstructorInfo \n<p class='summary'>Get a ConstructorInfo for a record type</p><dl><dt><span class='parameter'>recordType</span></dt><dd><p>The record type.</p></dd><dt><span class='parameter'>bindingFlags</span></dt><dd><p>Optional binding flags.</p></dd></dl><p class='returns'><p>Returns: A ConstructorInfo for the given record type.</p>"
},
{
"uri": "https://fsharp.github.io/fsharp-core-api-docs/reference/fsharp-reflection-fsharpvalue.html#PreComputeRecordFieldReader",
"title": "FSharpValue.PreComputeRecordFieldReader",
"content": "FSharpValue.PreComputeRecordFieldReader \nPreComputeRecordFieldReader \n<p class='summary'>Precompute a function for reading a particular field from a record.\n Assumes the given type is a RecordType with a field of the given name. \n If not, ArgumentException is raised during pre-computation.</p><p class='remarks'>Using the computed function will typically be faster than executing a corresponding call to Value.GetInfo\n because the path executed by the computed function is optimized given the knowledge that it will be\n used to read values of the given type.</p><dl><dt><span class='parameter'>info</span></dt><dd><p>The PropertyInfo of the field to read.</p></dd></dl><p class='returns'><p>Returns: A function to read the specified field from the record.</p><table class='inner-list exception-list'><tr><td><a href=\"https://docs.microsoft.com/dotnet/api/system.argumentexception\">ArgumentException</a></td><td>Thrown when the input type is not a record type.</td></tr></table>"
},
{
"uri": "https://fsharp.github.io/fsharp-core-api-docs/reference/fsharp-reflection-fsharpvalue.html#PreComputeRecordReader",
"title": "FSharpValue.PreComputeRecordReader",
"content": "FSharpValue.PreComputeRecordReader \nPreComputeRecordReader \n<p class='summary'>Precompute a function for reading all the fields from a record. The fields are returned in the\n same order as the fields reported by a call to Microsoft.FSharp.Reflection.Type.GetInfo for\n this type.</p><p class='remarks'>Assumes the given type is a RecordType. \n If not, ArgumentException is raised during pre-computation.\n\n Using the computed function will typically be faster than executing a corresponding call to Value.GetInfo\n because the path executed by the computed function is optimized given the knowledge that it will be\n used to read values of the given type.</p><dl><dt><span class='parameter'>recordType</span></dt><dd><p>The type of record to read.</p></dd><dt><span class='parameter'>bindingFlags</span></dt><dd><p>Optional binding flags.</p></dd></dl><p class='returns'><p>Returns: An optimized reader for the given record type.</p><table class='inner-list exception-list'><tr><td><a href=\"https://docs.microsoft.com/dotnet/api/system.argumentexception\">ArgumentException</a></td><td>Thrown when the input type is not a record type.</td></tr></table>"
},
{
"uri": "https://fsharp.github.io/fsharp-core-api-docs/reference/fsharp-reflection-fsharpvalue.html#PreComputeTupleConstructor",
"title": "FSharpValue.PreComputeTupleConstructor",
"content": "FSharpValue.PreComputeTupleConstructor \nPreComputeTupleConstructor \n<p class='summary'>Precompute a function for reading the values of a particular tuple type</p><p class='remarks'>Assumes the given type is a TupleType.\n If not, ArgumentException is raised during pre-computation.</p><dl><dt><span class='parameter'>tupleType</span></dt><dd><p>The type of tuple to read.</p></dd></dl><p class='returns'><p>Returns: A function to read a particular tuple type.</p><table class='inner-list exception-list'><tr><td><a href=\"https://docs.microsoft.com/dotnet/api/system.argumentexception\">ArgumentException</a></td><td>Thrown when the given type is not a tuple type.</td></tr></table>"
},
{
"uri": "https://fsharp.github.io/fsharp-core-api-docs/reference/fsharp-reflection-fsharpvalue.html#PreComputeTupleConstructorInfo",
"title": "FSharpValue.PreComputeTupleConstructorInfo",
"content": "FSharpValue.PreComputeTupleConstructorInfo \nPreComputeTupleConstructorInfo \n<p class='summary'>Gets a method that constructs objects of the given tuple type. \n For small tuples, no additional type will be returned.</p><p class='remarks'>For large tuples, an additional type is returned indicating that\n a nested encoding has been used for the tuple type. In this case\n the suffix portion of the tuple type has the given type and an\n object of this type must be created and passed as the last argument \n to the ConstructorInfo. A recursive call to PreComputeTupleConstructorInfo \n can be used to determine the constructor for that the suffix type.</p><dl><dt><span class='parameter'>tupleType</span></dt><dd><p>The input tuple type.</p></dd></dl><p class='returns'><p>Returns: The description of the tuple type constructor and an optional extra type\n for large tuples.</p>"
},
{
"uri": "https://fsharp.github.io/fsharp-core-api-docs/reference/fsharp-reflection-fsharpvalue.html#PreComputeTuplePropertyInfo",
"title": "FSharpValue.PreComputeTuplePropertyInfo",
"content": "FSharpValue.PreComputeTuplePropertyInfo \nPreComputeTuplePropertyInfo \n<p class='summary'>Gets information that indicates how to read a field of a tuple</p><dl><dt><span class='parameter'>tupleType</span></dt><dd><p>The input tuple type.</p></dd><dt><span class='parameter'>index</span></dt><dd><p>The index of the tuple element to describe.</p></dd></dl><p class='returns'><p>Returns: The description of the tuple element and an optional type and index if the tuple is big.</p>"
},
{
"uri": "https://fsharp.github.io/fsharp-core-api-docs/reference/fsharp-reflection-fsharpvalue.html#PreComputeTupleReader",
"title": "FSharpValue.PreComputeTupleReader",
"content": "FSharpValue.PreComputeTupleReader \nPreComputeTupleReader \n<p class='summary'>Precompute a function for reading the values of a particular tuple type</p><p class='remarks'>Assumes the given type is a TupleType.\n If not, ArgumentException is raised during pre-computation.</p><dl><dt><span class='parameter'>tupleType</span></dt><dd><p>The tuple type to read.</p></dd></dl><p class='returns'><p>Returns: A function to read values of the given tuple type.</p><table class='inner-list exception-list'><tr><td><a href=\"https://docs.microsoft.com/dotnet/api/system.argumentexception\">ArgumentException</a></td><td>Thrown when the given type is not a tuple type.</td></tr></table>"
},
{
"uri": "https://fsharp.github.io/fsharp-core-api-docs/reference/fsharp-reflection-fsharpvalue.html#PreComputeUnionConstructor",
"title": "FSharpValue.PreComputeUnionConstructor",
"content": "FSharpValue.PreComputeUnionConstructor \nPreComputeUnionConstructor \n<p class='summary'>Precompute a function for constructing a discriminated union value for a particular union case. </p><dl><dt><span class='parameter'>unionCase</span></dt><dd><p>The description of the union case.</p></dd><dt><span class='parameter'>bindingFlags</span></dt><dd><p>Optional binding flags.</p></dd></dl><p class='returns'><p>Returns: A function for constructing values of the given union case.</p>"
},
{
"uri": "https://fsharp.github.io/fsharp-core-api-docs/reference/fsharp-reflection-fsharpvalue.html#PreComputeUnionConstructorInfo",
"title": "FSharpValue.PreComputeUnionConstructorInfo",
"content": "FSharpValue.PreComputeUnionConstructorInfo \nPreComputeUnionConstructorInfo \n<p class='summary'>A method that constructs objects of the given case</p><dl><dt><span class='parameter'>unionCase</span></dt><dd><p>The description of the union case.</p></dd><dt><span class='parameter'>bindingFlags</span></dt><dd><p>Optional binding flags.</p></dd></dl><p class='returns'><p>Returns: The description of the constructor of the given union case.</p>"
},
{
"uri": "https://fsharp.github.io/fsharp-core-api-docs/reference/fsharp-reflection-fsharpvalue.html#PreComputeUnionReader",
"title": "FSharpValue.PreComputeUnionReader",
"content": "FSharpValue.PreComputeUnionReader \nPreComputeUnionReader \n<p class='summary'>Precompute a function for reading all the fields for a particular discriminator case of a union type</p><p class='remarks'>Using the computed function will typically be faster than executing a corresponding call to GetFields</p><dl><dt><span class='parameter'>unionCase</span></dt><dd><p>The description of the union case to read.</p></dd><dt><span class='parameter'>bindingFlags</span></dt><dd><p>Optional binding flags.</p></dd></dl><p class='returns'><p>Returns: A function to for reading the fields of the given union case.</p>"
},
{
"uri": "https://fsharp.github.io/fsharp-core-api-docs/reference/fsharp-reflection-fsharpvalue.html#PreComputeUnionTagMemberInfo",
"title": "FSharpValue.PreComputeUnionTagMemberInfo",
"content": "FSharpValue.PreComputeUnionTagMemberInfo \nPreComputeUnionTagMemberInfo \n<p class='summary'>Precompute a property or static method for reading an integer representing the case tag of a union type.</p><dl><dt><span class='parameter'>unionType</span></dt><dd><p>The type of union to read.</p></dd><dt><span class='parameter'>bindingFlags</span></dt><dd><p>Optional binding flags.</p></dd></dl><p class='returns'><p>Returns: The description of the union case reader.</p>"
},
{
"uri": "https://fsharp.github.io/fsharp-core-api-docs/reference/fsharp-reflection-fsharpvalue.html#PreComputeUnionTagReader",
"title": "FSharpValue.PreComputeUnionTagReader",
"content": "FSharpValue.PreComputeUnionTagReader \nPreComputeUnionTagReader \n<p class='summary'>Assumes the given type is a union type. \n If not, ArgumentException is raised during pre-computation.</p><p class='remarks'>Using the computed function is more efficient than calling GetUnionCase\n because the path executed by the computed function is optimized given the knowledge that it will be\n used to read values of the given type.</p><dl><dt><span class='parameter'>unionType</span></dt><dd><p>The type of union to optimize reading.</p></dd><dt><span class='parameter'>bindingFlags</span></dt><dd><p>Optional binding flags.</p></dd></dl><p class='returns'><p>Returns: An optimized function to read the tags of the given union type.</p>"
},
{
"uri": "https://fsharp.github.io/fsharp-core-api-docs/reference/fsharp-reflection-unioncaseinfo.html",
"title": "UnionCaseInfo",
"content": "UnionCaseInfo \n<p class='summary'>Represents a case of a discriminated union type</p> \nUnionCaseInfo.GetCustomAttributes \nGetCustomAttributes \nUnionCaseInfo.GetCustomAttributes \nGetCustomAttributes \nUnionCaseInfo.GetCustomAttributesData \nGetCustomAttributesData \nUnionCaseInfo.GetFields \nGetFields \nUnionCaseInfo.Tag \nTag \nUnionCaseInfo.Name \nName \nUnionCaseInfo.DeclaringType \nDeclaringType"
},
{
"uri": "https://fsharp.github.io/fsharp-core-api-docs/reference/fsharp-reflection-unioncaseinfo.html#GetCustomAttributes",
"title": "UnionCaseInfo.GetCustomAttributes",
"content": "UnionCaseInfo.GetCustomAttributes \nGetCustomAttributes \n<p class='summary'>Returns the custom attributes associated with the case matching the given attribute type.</p><dl><dt><span class='parameter'>attributeType</span></dt><dd><p>The type of attributes to return.</p></dd></dl><p class='returns'><p>Returns: An array of custom attributes.</p>"
},
{
"uri": "https://fsharp.github.io/fsharp-core-api-docs/reference/fsharp-reflection-unioncaseinfo.html#GetCustomAttributes",
"title": "UnionCaseInfo.GetCustomAttributes",
"content": "UnionCaseInfo.GetCustomAttributes \nGetCustomAttributes \n<p class='summary'>Returns the custom attributes associated with the case.</p><p class='returns'><p>Returns: An array of custom attributes.</p>"
},
{
"uri": "https://fsharp.github.io/fsharp-core-api-docs/reference/fsharp-reflection-unioncaseinfo.html#GetCustomAttributesData",
"title": "UnionCaseInfo.GetCustomAttributesData",
"content": "UnionCaseInfo.GetCustomAttributesData \nGetCustomAttributesData \n<p class='summary'>Returns the custom attributes data associated with the case.</p><p class='returns'><p>Returns: An list of custom attribute data items.</p>"
},
{
"uri": "https://fsharp.github.io/fsharp-core-api-docs/reference/fsharp-reflection-unioncaseinfo.html#GetFields",
"title": "UnionCaseInfo.GetFields",
"content": "UnionCaseInfo.GetFields \nGetFields \n<p class='summary'>The fields associated with the case, represented by a PropertyInfo.</p><p class='returns'><p>Returns: The fields associated with the case.</p>"
},
{
"uri": "https://fsharp.github.io/fsharp-core-api-docs/reference/fsharp-reflection-unioncaseinfo.html#Tag",
"title": "UnionCaseInfo.Tag",
"content": "UnionCaseInfo.Tag \nTag \n<p class='summary'>The integer tag for the case.</p>"
},
{
"uri": "https://fsharp.github.io/fsharp-core-api-docs/reference/fsharp-reflection-unioncaseinfo.html#Name",
"title": "UnionCaseInfo.Name",
"content": "UnionCaseInfo.Name \nName \n<p class='summary'>The name of the case.</p>"
},
{
"uri": "https://fsharp.github.io/fsharp-core-api-docs/reference/fsharp-reflection-unioncaseinfo.html#DeclaringType",
"title": "UnionCaseInfo.DeclaringType",
"content": "UnionCaseInfo.DeclaringType \nDeclaringType \n<p class='summary'>The type in which the case occurs.</p>"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment