Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add doc for new function pointer support #8875

Merged
merged 10 commits into from
Sep 1, 2023
20 changes: 17 additions & 3 deletions xml/System.Reflection/FieldInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -660,9 +660,23 @@
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<summary>Gets the modified type of this field object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
A modified type supports <xref:System.Type.GetOptionalCustomModifiers%2A>, <xref:System.Type.GetRequiredCustomModifiers%2A> and <xref:System.Type.GetFunctionPointerCallingConventions%2A> which are used to to obtain custom modifiers from a function pointer.
steveharter marked this conversation as resolved.
Show resolved Hide resolved

To obtain the normal, unmodified type from a modified type, use <xref:System.Type.UnderlyingSystemType%2A>.

This method is provided for designers of managed compilers. For more information on custom modifiers, see classes in the <xref:System.Runtime.CompilerServices> namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/).

]]></format>
</remarks>
<altmember cref="M:System.Reflection.FieldInfo.GetOptionalCustomModifiers" />
<altmember cref="M:System.Reflection.FieldInfo.GetRequiredCustomModifiers" />
<altmember cref="M:System.Reflection.PropertyInfo.GetModifiedPropertyType" />
<altmember cref="M:System.Reflection.ParameterInfo.GetModifiedParameterType" />
</Docs>
</Member>
<Member MemberName="GetOptionalCustomModifiers">
Expand Down
20 changes: 17 additions & 3 deletions xml/System.Reflection/ParameterInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -726,9 +726,23 @@
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<summary>Gets the modified type of this parameter object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
A modified type supports <xref:System.Type.GetOptionalCustomModifiers%2A>, <xref:System.Type.GetRequiredCustomModifiers%2A> and <xref:System.Type.GetFunctionPointerCallingConventions%2A> which are used to to obtain custom modifiers from a function pointer.
steveharter marked this conversation as resolved.
Show resolved Hide resolved

To obtain the normal, unmodified type from a modified type, use <xref:System.Type.UnderlyingSystemType%2A>.

This method is provided for designers of managed compilers. For more information on custom modifiers, see classes in the <xref:System.Runtime.CompilerServices> namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/).

]]></format>
</remarks>
<altmember cref="M:System.Reflection.ParameterInfo.GetOptionalCustomModifiers" />
<altmember cref="M:System.Reflection.ParameterInfo.GetRequiredCustomModifiers" />
<altmember cref="M:System.Reflection.FieldInfo.GetModifiedFieldType" />
<altmember cref="M:System.Reflection.PropertyInfo.GetModifiedPropertyType" />
</Docs>
</Member>
<Member MemberName="GetOptionalCustomModifiers">
Expand Down
20 changes: 17 additions & 3 deletions xml/System.Reflection/PropertyInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -989,9 +989,23 @@
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<summary>Gets the modified type of this property object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
A modified type supports <xref:System.Type.GetOptionalCustomModifiers%2A>, <xref:System.Type.GetRequiredCustomModifiers%2A> and <xref:System.Type.GetFunctionPointerCallingConventions%2A> which are used to to obtain custom modifiers from a function pointer.
steveharter marked this conversation as resolved.
Show resolved Hide resolved

To obtain the normal, unmodified type from a modified type, use <xref:System.Type.UnderlyingSystemType%2A>.

This method is provided for designers of managed compilers. For more information on custom modifiers, see classes in the <xref:System.Runtime.CompilerServices> namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/).

]]></format>
</remarks>
<altmember cref="M:System.Reflection.PropertyInfo.GetOptionalCustomModifiers" />
<altmember cref="M:System.Reflection.PropertyInfo.GetRequiredCustomModifiers" />
<altmember cref="M:System.Reflection.FieldInfo.GetModifiedFieldType" />
<altmember cref="M:System.Reflection.ParameterInfo.GetModifiedParameterType" />
</Docs>
</Member>
<Member MemberName="GetOptionalCustomModifiers">
Expand Down
96 changes: 75 additions & 21 deletions xml/System/Type.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4209,9 +4209,26 @@ In .NET 6 and earlier versions, the <xref:System.Type.GetFields%2A> method does
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<summary>When overridden in a derived class, returns the calling conventions of the current function pointer <see cref="T:System.Type" />.</summary>
<returns>An array of <see cref="T:System.Type" /> objects representing all the calling conventions for the current function pointer <see cref="T:System.Type" />.

-or-

An empty array of type <see cref="T:System.Type" />, if no calling conventions are defined for the current function pointer <see cref="T:System.Type" />.

-or-

An empty array of type <see cref="T:System.Type" />, if the current function pointer <see cref="T:System.Type" /> is not a modified <see cref="T:System.Type" />. A modified <see cref="T:System.Type" /> is obtained from <see cref="M:System.Reflection.FieldInfo.GetModifiedFieldType" />, <see cref="M:System.Reflection.PropertyInfo.GetModifiedPropertyType" /> or <see cref="M:System.Reflection.ParameterInfo.GetModifiedParameterType" />
</returns>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
This method is provided for designers of managed compilers. For more information on custom modifiers, see classes in the <xref:System.Runtime.CompilerServices> namespace.

]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The current <see cref="T:System.Type" /> object is not a function pointer. That is, the <see cref="P:System.Type.IsFunctionPointer" /> property returns <see langword="false" />.</exception>
steveharter marked this conversation as resolved.
Show resolved Hide resolved
</Docs>
</Member>
<Member MemberName="GetFunctionPointerParameterTypes">
Expand All @@ -4237,9 +4254,14 @@ In .NET 6 and earlier versions, the <xref:System.Type.GetFields%2A> method does
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<summary>When overridden in a derived class, returns the parameter types of the current function pointer <see cref="T:System.Type" />.</summary>
<returns>An array of <see cref="T:System.Type" /> objects representing all the parameter types for the current function pointer <see cref="T:System.Type" />.

-or-

An empty array of type <see cref="T:System.Type" />, if no parameters are defined for the current function pointer <see cref="T:System.Type" />.
</returns>
<exception cref="T:System.InvalidOperationException">The current <see cref="T:System.Type" /> object is not a function pointer. That is, the <see cref="P:System.Type.IsFunctionPointer" /> property returns <see langword="false" />.</exception>
steveharter marked this conversation as resolved.
Show resolved Hide resolved
</Docs>
</Member>
<Member MemberName="GetFunctionPointerReturnType">
Expand All @@ -4265,9 +4287,9 @@ In .NET 6 and earlier versions, the <xref:System.Type.GetFields%2A> method does
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<summary>When overridden in a derived class, returns the return type of the current function pointer <see cref="T:System.Type" />.</summary>
<returns>A <see cref="T:System.Type" /> object representing the return type for the current function pointer <see cref="T:System.Type" />.</returns>
<exception cref="T:System.InvalidOperationException">The current <see cref="T:System.Type" /> object is not a function pointer. That is, the <see cref="P:System.Type.IsFunctionPointer" /> property returns <see langword="false" />.</exception>
steveharter marked this conversation as resolved.
Show resolved Hide resolved
</Docs>
</Member>
<Member MemberName="GetGenericArguments">
Expand Down Expand Up @@ -7635,9 +7657,25 @@ If the current <xref:System.Type> represents a type parameter in the definition
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<summary>When overridden in a derived class, returns the optional custom modifiers of the current <see cref="T:System.Type" />.</summary>
<returns>An array of <see cref="T:System.Type" /> objects that identify the optional custom modifiers of the current <see cref="T:System.Type" />.

-or-

An empty array of type <see cref="T:System.Type" />, if the current <see cref="T:System.Type" /> has no custom modifiers.

-or-

An empty array of type <see cref="T:System.Type" />, if the current <see cref="T:System.Type" /> is not a modified <see cref="T:System.Type" />. A modified <see cref="T:System.Type" /> is obtained from <see cref="M:System.Reflection.FieldInfo.GetModifiedFieldType" />, <see cref="M:System.Reflection.PropertyInfo.GetModifiedPropertyType" /> or <see cref="M:System.Reflection.ParameterInfo.GetModifiedParameterType" />
</returns>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
The <xref:System.Type.GetOptionalCustomModifiers%2A> and <xref:System.Type.GetRequiredCustomModifiers%2A> methods are provided for designers of managed compilers. For more information on custom modifiers, see classes in the <xref:System.Runtime.CompilerServices> namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/).

]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="GetProperties">
Expand Down Expand Up @@ -8903,9 +8941,25 @@ In .NET 6 and earlier versions, the <xref:System.Type.GetProperties%2A> method d
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<summary>When overridden in a derived class, returns the required custom modifiers of the current <see cref="T:System.Type" />.</summary>
<returns>An array of <see cref="T:System.Type" /> objects that identify the required custom modifiers of the current <see cref="T:System.Type" />.

-or-

An empty array of type <see cref="T:System.Type" />, if the current <see cref="T:System.Type" /> has no custom modifiers.

-or-

An empty array of type <see cref="T:System.Type" />, if the current <see cref="T:System.Type" /> is not a modified <see cref="T:System.Type" />. A modified <see cref="T:System.Type" /> is obtained from <see cref="M:System.Reflection.FieldInfo.GetModifiedFieldType" />, <see cref="M:System.Reflection.PropertyInfo.GetModifiedPropertyType" /> or <see cref="M:System.Reflection.ParameterInfo.GetModifiedParameterType" />
</returns>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
The <xref:System.Type.GetRequiredCustomModifiers%2A> and <xref:System.Type.GetRequiredCustomModifiers%2A> methods are provided for designers of managed compilers. For more information on custom modifiers, see classes in the <xref:System.Runtime.CompilerServices> namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/).

]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="GetType">
Expand Down Expand Up @@ -13536,9 +13590,9 @@ Byref-like structures are declared using `ref struct` keyword in C#. An instance
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
<summary>Gets a value that indicates whether the current <see cref="T:System.Type" /> is a function pointer.</summary>
<value>
<see langword="true" /> if the current <see cref="T:System.Type" /> is a function pointer; otherwise, <see langword="false" />.</value>
</Docs>
</Member>
<Member MemberName="IsGenericMethodParameter">
Expand Down Expand Up @@ -15767,9 +15821,9 @@ A signature type is a restricted type that can be passed to the <xref:System.Typ
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
<summary>Gets a value that indicates whether the current <see cref="T:System.Type" /> is an unmanaged function pointer.</summary>
<value>
<see langword="true" /> if the current <see cref="T:System.Type" /> is an unmanaged function pointer; otherwise, <see langword="false" />.</value>
</Docs>
</Member>
<Member MemberName="IsValueType">
Expand Down
Loading