Skip to content

Commit 962c38f

Browse files
Ron PetrushaBillWagner
authored andcommitted
Added exception information to RuntimeReflectionExtensions (#1418)
* Added exception information to RuntimeReflectionExtensions * Fixed badly formed xml * Fixed bad exception element
1 parent 84743f5 commit 962c38f

File tree

1 file changed

+70
-1
lines changed

1 file changed

+70
-1
lines changed

xml/System.Reflection/RuntimeReflectionExtensions.xml

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@
6969
<summary>Gets an object that represents the method represented by the specified delegate.</summary>
7070
<returns>An object that represents the method.</returns>
7171
<remarks>To be added.</remarks>
72+
<exception cref="T:System.ArgumentNullException"><paramref name="del" /> is <see langword="null" />.</exception>
73+
<exception cref="T:System.MemberAccessException">The caller does not have access to the method represented by the delegate (for example, if the method is private).</exception>
74+
<altmember cref="P:System.Delegate.Method" />
7275
</Docs>
7376
</Member>
7477
<Member MemberName="GetRuntimeBaseDefinition">
@@ -108,6 +111,8 @@
108111
<summary>Retrieves an object that represents the specified method on the direct or indirect base class where the method was first declared.</summary>
109112
<returns>An object that represents the specified method's initial declaration on a base class.</returns>
110113
<remarks>To be added.</remarks>
114+
<exception cref="T:System.ArgumentNullException"><paramref name="method" /> is <see langword="null" />.</exception>
115+
<altmember cref="M:System.Reflection.MethodInfo.GetBaseDefinition" />
111116
</Docs>
112117
</Member>
113118
<Member MemberName="GetRuntimeEvent">
@@ -148,6 +153,13 @@
148153
<summary>Retrieves an object that represents the specified event.</summary>
149154
<returns>An object that represents the specified event, or <see langword="null" /> if the event is not found.</returns>
150155
<remarks>To be added.</remarks>
156+
<exception cref="T:System.ArgumentNullException"><paramref name="type" /> is <see langword="null" />.
157+
158+
-or-
159+
160+
<paramref name="name" /> is <see langword="null" />.
161+
</exception>
162+
<altmember cref="M:System.Type.GetEvent(System.String)" />
151163
</Docs>
152164
</Member>
153165
<Member MemberName="GetRuntimeEvents">
@@ -193,6 +205,8 @@
193205
194206
]]></format>
195207
</remarks>
208+
<exception cref="T:System.ArgumentNullException"><paramref name="type" /> is <see langword="null" />.</exception>
209+
<altmember cref="M:System.Type.GetEvents(System.Reflection.BindingFlags)" />
196210
</Docs>
197211
</Member>
198212
<Member MemberName="GetRuntimeField">
@@ -233,6 +247,13 @@
233247
<summary>Retrieves an object that represents a specified field.</summary>
234248
<returns>An object that represents the specified field, or <see langword="null" /> if the field is not found.</returns>
235249
<remarks>To be added.</remarks>
250+
<exception cref="T:System.ArgumentNullException"><paramref name="type" /> is <see langword="null" />.
251+
252+
-or-
253+
254+
<paramref name="name" /> is <see langword="null" />.
255+
</exception>
256+
<altmember cref="M:System.Type.GetField(System.String)" />
236257
</Docs>
237258
</Member>
238259
<Member MemberName="GetRuntimeFields">
@@ -278,6 +299,8 @@
278299
279300
]]></format>
280301
</remarks>
302+
<exception cref="T:System.ArgumentNullException"><paramref name="type" /> is <see langword="null" />.</exception>
303+
<altmember cref="M:System.Type.GetFields(System.Reflection.BindingFlags)" />
281304
</Docs>
282305
</Member>
283306
<Member MemberName="GetRuntimeInterfaceMap">
@@ -318,6 +341,34 @@
318341
<summary>Returns an interface mapping for the specified type and the specified interface.</summary>
319342
<returns>An object that represents the interface mapping for the specified interface and type.</returns>
320343
<remarks>To be added.</remarks>
344+
<exception cref="T:System.ArgumentNullException"><paramref name="typeInfo" /> is <see langword="null" />.
345+
346+
-or-
347+
348+
<paramref name="interfaceType" /> is <see langword="null" />.
349+
</exception>
350+
<exception cref="T:System.ArgumentException"><paramref name="interfaceType" /> is not implemented by <paramref name="typeInfo" />.
351+
352+
-or-
353+
354+
<paramref name="interfaceType" /> does not refer to an interface.
355+
356+
-or-
357+
358+
<paramref name="typeInfo" /> or <paramref name="interfaceType" /> is an open generic type.
359+
360+
-or-
361+
362+
<paramref name="interfaceType" /> is a generic interface, and <paramref name="typeInfo" /> is an array type.
363+
</exception>
364+
<exception cref="T:System.InvalidOperationException"><paramref name="typeInfo" /> represents a generic type parameter.</exception>
365+
<exception cref="T:System.NotSupportedException"><paramref name="typeInfo" /> is a <see cref="T:System.Reflection.Emit.TypeBuilder" /> instance whose <see cref="M:System.Reflection.Emit.TypeBuilder.CreateType" /> method has not yet been called.
366+
367+
-or-
368+
369+
The invoked method is not supported in the base class. Derived classes must provide an implementation.
370+
</exception>
371+
<altmember cref="M:System.Type.GetInterfaceMap(System.Type)" />
321372
</Docs>
322373
</Member>
323374
<Member MemberName="GetRuntimeMethod">
@@ -360,6 +411,14 @@
360411
<summary>Retrieves an object that represents a specified method.</summary>
361412
<returns>An object that represents the specified method, or <see langword="null" /> if the method is not found.</returns>
362413
<remarks>To be added.</remarks>
414+
<exception cref="T:System.ArgumentNullException"><paramref name="type" /> is <see langword="null" />.
415+
416+
-or-
417+
418+
<paramref name="name" /> is <see langword="null" />.
419+
</exception>
420+
<exception cref="T:System.AmbiguousMatchException">More than one method is found with the specified name.</exception>
421+
<altmember cref="M:System.Type.GetMethod(System.String,System.Type[])" />
363422
</Docs>
364423
</Member>
365424
<Member MemberName="GetRuntimeMethods">
@@ -405,6 +464,8 @@
405464
406465
]]></format>
407466
</remarks>
467+
<exception cref="T:System.ArgumentNullException"><paramref name="type" /> is <see langword="null" />.</exception>
468+
<altmember cref="M:System.Type.GetMethods(System.Reflection.BindingFlags)" />
408469
</Docs>
409470
</Member>
410471
<Member MemberName="GetRuntimeProperties">
@@ -450,6 +511,8 @@
450511
451512
]]></format>
452513
</remarks>
514+
<exception cref="T:System.ArgumentNullException"><paramref name="type" /> is <see langword="null" />.</exception>
515+
<altmember cref="M:System.Type.GetProperties(System.Reflection.BindingFlags" />
453516
</Docs>
454517
</Member>
455518
<Member MemberName="GetRuntimeProperty">
@@ -491,10 +554,16 @@
491554
<returns>An object that represents the specified property, or <see langword="null" /> if the property is not found.</returns>
492555
<remarks>To be added.</remarks>
493556
<exception cref="T:System.ArgumentNullException">
494-
<paramref name="type" /> is <see langword="null" />.</exception>
557+
<paramref name="type" /> is <see langword="null" />.
558+
559+
-or-
560+
561+
<paramref name="name" /> is <see langword="null" />.
562+
</exception>
495563
<exception cref="T:System.ArgumentException">
496564
<paramref name="type" /> is not a <see langword="RuntimeType" />.</exception>
497565
<exception cref="T:System.Reflection.AmbiguousMatchException">More than one property with the requested name was found.</exception>
566+
<altmember cref="M:System.Type.GetProperty(System.String)" />
498567
</Docs>
499568
</Member>
500569
</Members>

0 commit comments

Comments
 (0)