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

Port MethodInvoker and ConstructorInvoker doc #9194

Merged
merged 4 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 31 additions & 20 deletions xml/System.Reflection/ConstructorInvoker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
</Attribute>
</Attributes>
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
<summary>Invokes the method reflected by the provided <see cref="T:System.Reflection.ConstructorInfo" />.</summary>
steveharter marked this conversation as resolved.
Show resolved Hide resolved
<remarks>Used for better performance than <see cref="M:System.Reflection.ConstructorInfo.Invoke(System.Object[])" /> when compatibility with that method is not necessary and when the caller can cache the ConstructorInvoker instance for additional invoke calls.<br /> Unlike <see cref="M:System.Reflection.ConstructorInfo.Invoke(System.Object[])" />, the invoke methods do not look up default values for arguments when <see cref="F:System.Type.Missing" /> is specified. In addition, the target constructor may be inlined for performance and not appear in stack traces.</remarks>
steveharter marked this conversation as resolved.
Show resolved Hide resolved
</Docs>
<Members>
<Member MemberName="Create">
Expand Down Expand Up @@ -53,10 +53,11 @@
<Parameter Name="constructor" Type="System.Reflection.ConstructorInfo" />
</Parameters>
<Docs>
<param name="constructor">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<param name="constructor">The constructor that will be invoked.</param>
<summary>Creates a new instance of ConstructorInvoker.</summary>
steveharter marked this conversation as resolved.
Show resolved Hide resolved
<returns>An instance of a ConstructorInvoker.</returns>
steveharter marked this conversation as resolved.
Show resolved Hide resolved
<remarks>For performance, the resulting instance should be cached for additional calls.</remarks>
<exception cref="T:System.ArgumentException">The <paramref name="constructor" /> is not a runtime-based method.</exception>
</Docs>
</Member>
<Member MemberName="Invoke">
Expand All @@ -76,9 +77,12 @@
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<returns>To be added.</returns>
<summary>Invokes the constructor.</summary>
<returns>An instance of the class associated with the constructor.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.InvalidOperationException">The type that declares the method is an open generic type.</exception>
<exception cref="T:System.Reflection.TargetParameterCountException">The correct number of arguments were not provided.</exception>
steveharter marked this conversation as resolved.
Show resolved Hide resolved
<exception cref="T:System.NotSupportedException">The calling convention or signature is not supported.</exception>
</Docs>
</Member>
<Member MemberName="Invoke">
Expand All @@ -100,10 +104,12 @@
<Parameter Name="arg1" Type="System.Object" />
</Parameters>
<Docs>
<param name="arg1">To be added.</param>
<summary>To be added.</summary>
<param name="arg1">The first argument for the invoked method.</param>
<summary>Invokes the constructor using the specified parameters.</summary>
steveharter marked this conversation as resolved.
Show resolved Hide resolved
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<inheritdoc cref="M:System.Reflection.ConstructorInvoker.Invoke" />
<exception cref="T:System.ArgumentException">The arguments do not match the signature of the invoked constructor.</exception>
</Docs>
</Member>
<Member MemberName="Invoke">
Expand Down Expand Up @@ -132,10 +138,12 @@
</Parameter>
</Parameters>
<Docs>
<param name="arguments">To be added.</param>
<param name="arguments">The arguments for the invoked constructor.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<inheritdoc cref="M:System.Reflection.ConstructorInvoker.Invoke(System.Object)" />
<exception cref="T:System.ArgumentException">The arguments do not match the signature of the invoked constructor.</exception>
</Docs>
</Member>
<Member MemberName="Invoke">
Expand All @@ -158,11 +166,12 @@
<Parameter Name="arg2" Type="System.Object" />
</Parameters>
<Docs>
<param name="arg1">To be added.</param>
<param name="arg2">To be added.</param>
<param name="arg1">The first argument for the invoked method.</param>
<param name="arg2">The second argument for the invoked method.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<inheritdoc cref="M:System.Reflection.ConstructorInvoker.Invoke(System.Object)" />
</Docs>
</Member>
<Member MemberName="Invoke">
Expand All @@ -186,12 +195,13 @@
<Parameter Name="arg3" Type="System.Object" />
</Parameters>
<Docs>
<param name="arg1">To be added.</param>
<param name="arg2">To be added.</param>
<param name="arg3">To be added.</param>
<param name="arg1">The first argument for the invoked method.</param>
<param name="arg2">The second argument for the invoked method.</param>
<param name="arg3">The third argument for the invoked method.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<inheritdoc cref="M:System.Reflection.ConstructorInvoker.Invoke(System.Object)" />
</Docs>
</Member>
<Member MemberName="Invoke">
Expand All @@ -216,13 +226,14 @@
<Parameter Name="arg4" Type="System.Object" />
</Parameters>
<Docs>
<param name="arg1">To be added.</param>
<param name="arg2">To be added.</param>
<param name="arg3">To be added.</param>
<param name="arg4">To be added.</param>
<param name="arg1">The first argument for the invoked method.</param>
<param name="arg2">The second argument for the invoked method.</param>
<param name="arg3">The third argument for the invoked method.</param>
<param name="arg4">The fourth argument for the invoked method.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<inheritdoc cref="M:System.Reflection.ConstructorInvoker.Invoke(System.Object)" />
</Docs>
</Member>
</Members>
Expand Down
66 changes: 41 additions & 25 deletions xml/System.Reflection/MethodInvoker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
</Attribute>
</Attributes>
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
<summary>Invokes the method reflected by the provided <see cref="T:System.Reflection.MethodBase" />.</summary>
steveharter marked this conversation as resolved.
Show resolved Hide resolved
<remarks>Used for better performance than <see cref="M:System.Reflection.MethodBase.Invoke(System.Object,System.Object[])" /> when compatibility with that method is not necessary and when the caller can cache the MethodInvoker instance for additional invoke calls.<br /> Unlike <see cref="M:System.Reflection.MethodBase.Invoke(System.Object,System.Object[])" />, the invoke methods do not look up default values for arguments when <see cref="F:System.Type.Missing" /> is specified. In addition, the target method may be inlined for performance and not appear in stack traces.</remarks>
steveharter marked this conversation as resolved.
Show resolved Hide resolved
</Docs>
<Members>
<Member MemberName="Create">
Expand Down Expand Up @@ -53,10 +53,11 @@
<Parameter Name="method" Type="System.Reflection.MethodBase" />
</Parameters>
<Docs>
<param name="method">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<param name="method">The method that will be invoked.</param>
<summary>Creates a new instance of MethodInvoker.</summary>
steveharter marked this conversation as resolved.
Show resolved Hide resolved
<returns>An instance of a MethodInvoker.</returns>
steveharter marked this conversation as resolved.
Show resolved Hide resolved
<remarks>For performance, the resulting instance should be cached for additional calls.</remarks>
<exception cref="T:System.ArgumentException">The <paramref name="method" /> is not a runtime-based method.</exception>
</Docs>
</Member>
<Member MemberName="Invoke">
Expand All @@ -78,10 +79,18 @@
<Parameter Name="obj" Type="System.Object" />
</Parameters>
<Docs>
<param name="obj">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<param name="obj">The object on which to invoke the method. If the method is static, this argument is ignored.</param>
<summary>Invokes the method using the specified parameters.</summary>
steveharter marked this conversation as resolved.
Show resolved Hide resolved
<returns>An object containing the return value of the invoked method, or <see langword="null" /> if the invoked method does not have a return value.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.Reflection.TargetException">The <para>obj</para> parameter is <see langword="null" /> and the method is not static.
steveharter marked this conversation as resolved.
Show resolved Hide resolved

-or-

The method is not declared or inherited by the class of <para>obj</para>.</exception>
steveharter marked this conversation as resolved.
Show resolved Hide resolved
<exception cref="T:System.InvalidOperationException">The type that declares the method is an open generic type.</exception>
<exception cref="T:System.Reflection.TargetParameterCountException">The correct number of arguments were not provided.</exception>
steveharter marked this conversation as resolved.
Show resolved Hide resolved
<exception cref="T:System.NotSupportedException">The calling convention or signature is not supported.</exception>
</Docs>
</Member>
<Member MemberName="Invoke">
Expand All @@ -104,11 +113,13 @@
<Parameter Name="arg1" Type="System.Object" />
</Parameters>
<Docs>
<param name="obj">To be added.</param>
<param name="arg1">To be added.</param>
<param name="obj">The object on which to invoke the method. If the method is static, this argument is ignored.</param>
<param name="arg1">The first argument for the invoked method.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<inheritdoc cref="M:System.Reflection.MethodInvoker.Invoke(System.Object)" />
<exception cref="T:System.ArgumentException">The arguments do not match the signature of the invoked method.</exception>
</Docs>
</Member>
<Member MemberName="Invoke">
Expand Down Expand Up @@ -138,11 +149,13 @@
</Parameter>
</Parameters>
<Docs>
<param name="obj">To be added.</param>
<param name="arguments">To be added.</param>
<param name="obj">The object on which to invoke the method. If the method is static, this argument is ignored.</param>
<param name="arguments">The arguments for the invoked method.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<inheritdoc cref="M:System.Reflection.MethodInvoker.Invoke(System.Object)" />
<exception cref="T:System.ArgumentException">The arguments do not match the signature of the invoked method.</exception>
</Docs>
</Member>
<Member MemberName="Invoke">
Expand All @@ -166,12 +179,13 @@
<Parameter Name="arg2" Type="System.Object" />
</Parameters>
<Docs>
<param name="obj">To be added.</param>
<param name="arg1">To be added.</param>
<param name="arg2">To be added.</param>
<param name="obj">The object on which to invoke the method. If the method is static, this argument is ignored.</param>
<param name="arg1">The first argument for the invoked method.</param>
<param name="arg2">The second argument for the invoked method.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<inheritdoc cref="M:System.Reflection.MethodInvoker.Invoke(System.Object)" />
</Docs>
</Member>
<Member MemberName="Invoke">
Expand All @@ -196,13 +210,14 @@
<Parameter Name="arg3" Type="System.Object" />
</Parameters>
<Docs>
<param name="obj">To be added.</param>
<param name="arg1">To be added.</param>
<param name="arg2">To be added.</param>
<param name="arg3">To be added.</param>
<param name="obj">The object on which to invoke the method. If the method is static, this argument is ignored.</param>
<param name="arg1">The first argument for the invoked method.</param>
<param name="arg2">The second argument for the invoked method.</param>
<param name="arg3">The third argument for the invoked method.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<inheritdoc cref="M:System.Reflection.MethodInvoker.Invoke(System.Object)" />
</Docs>
</Member>
<Member MemberName="Invoke">
Expand All @@ -228,14 +243,15 @@
<Parameter Name="arg4" Type="System.Object" />
</Parameters>
<Docs>
<param name="obj">To be added.</param>
<param name="arg1">To be added.</param>
<param name="arg2">To be added.</param>
<param name="arg3">To be added.</param>
<param name="arg4">To be added.</param>
<param name="obj">The object on which to invoke the method. If the method is static, this argument is ignored.</param>
<param name="arg1">The first argument for the invoked method.</param>
<param name="arg2">The second argument for the invoked method.</param>
<param name="arg3">The third argument for the invoked method.</param>
<param name="arg4">The fourth argument for the invoked method.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<inheritdoc cref="M:System.Reflection.MethodInvoker.Invoke(System.Object)" />
</Docs>
</Member>
</Members>
Expand Down
Loading