Change disposed exceptions to use ObjectDisposedException.ThrowIf #43503
Labels
area-mvc
Includes: MVC, Actions and Controllers, Localization, CORS, most templates
area-networking
Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
clean-up
This issue is internal clean-up and has no effect on public APIs or expected behaviors
task
Milestone
Similar to #43482
APIs are available to simplify throwing
ObjectDisposedException
:https://github.com/dotnet/runtime/blob/a54a823ece1094dd05b7380614bd43566834a8f9/src/libraries/System.Private.CoreLib/src/System/ObjectDisposedException.cs#L49-L73
Consider updating code to use
ObjectDisposedException.ThrowIf
.The text was updated successfully, but these errors were encountered: