Skip to content

Commit 0ac6458

Browse files
authored
add new exceptions (#7367)
1 parent 0ed967e commit 0ac6458

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

xml/Microsoft.Extensions.DependencyInjection/ISupportRequiredService.xml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
</AssemblyInfo>
2020
<Interfaces />
2121
<Docs>
22-
<summary>Optional contract used by <see cref="M:Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService``1(System.IServiceProvider)" />
23-
to resolve services if supported by <see cref="T:System.IServiceProvider" />.</summary>
22+
<summary>Optional contract used by <see cref="M:Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService``1(System.IServiceProvider)" /> to resolve services if supported by <see cref="T:System.IServiceProvider" />.</summary>
2423
<remarks>To be added.</remarks>
2524
</Docs>
2625
<Members>
@@ -51,12 +50,12 @@
5150
<Parameter Name="serviceType" Type="System.Type" />
5251
</Parameters>
5352
<Docs>
54-
<param name="serviceType">An object that specifies the type of service object to get.</param>
55-
<summary>Gets service of type <paramref name="serviceType" /> from the <see cref="T:System.IServiceProvider" /> implementing
56-
this interface.</summary>
57-
<returns>A service object of type <paramref name="serviceType" />.
58-
Throws an exception if the <see cref="T:System.IServiceProvider" /> cannot create the object.</returns>
53+
<param name="serviceType">The type of service object to get.</param>
54+
<summary>Gets service of type <paramref name="serviceType" /> from the <see cref="T:System.IServiceProvider" /> that implements this interface.</summary>
55+
<returns>A service object of type <paramref name="serviceType" />. Throws an exception if the <see cref="T:System.IServiceProvider" /> cannot create the object.</returns>
5956
<remarks>To be added.</remarks>
57+
<exception cref="T:System.ObjectDisposedException">
58+
<paramref name="provider" /> has already been disposed.</exception>
6059
</Docs>
6160
</Member>
6261
</Members>

xml/Microsoft.Extensions.DependencyInjection/ServiceProviderServiceExtensions.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@
142142
<returns>A service object of type <paramref name="serviceType" />.</returns>
143143
<remarks>To be added.</remarks>
144144
<exception cref="T:System.InvalidOperationException">There is no service of type <paramref name="serviceType" />.</exception>
145+
<exception cref="T:System.ObjectDisposedException">
146+
<paramref name="provider" /> has already been disposed.</exception>
145147
</Docs>
146148
</Member>
147149
<Member MemberName="GetRequiredService&lt;T&gt;">
@@ -180,6 +182,8 @@
180182
<returns>A service object of type <typeparamref name="T" />.</returns>
181183
<remarks>To be added.</remarks>
182184
<exception cref="T:System.InvalidOperationException">There is no service of type <typeparamref name="T" />.</exception>
185+
<exception cref="T:System.ObjectDisposedException">
186+
<paramref name="provider" /> has already been disposed.</exception>
183187
</Docs>
184188
</Member>
185189
<Member MemberName="GetService&lt;T&gt;">

0 commit comments

Comments
 (0)