161 references to ThrowIf
Aspire.Dashboard (1)
ServiceClient\DashboardClient.cs (1)
240ObjectDisposedException.ThrowIf(priorState is StateDisposed, this);
Aspire.Hosting (9)
Dcp\KubernetesService.cs (9)
128ObjectDisposedException.ThrowIf(_disposed, this); 161ObjectDisposedException.ThrowIf(_disposed, this); 196ObjectDisposedException.ThrowIf(_disposed, this); 226ObjectDisposedException.ThrowIf(_disposed, this); 260ObjectDisposedException.ThrowIf(_disposed, this); 310ObjectDisposedException.ThrowIf(_disposed, this); 360ObjectDisposedException.ThrowIf(_disposed, this); 384ObjectDisposedException.ThrowIf(_disposed, this); 556ObjectDisposedException.ThrowIf(_disposed, this);
Aspire.Hosting.Testing (5)
DistributedApplicationFactory.cs (5)
48ObjectDisposedException.ThrowIf(_disposingCts.IsCancellationRequested, this); 71ObjectDisposedException.ThrowIf(_disposingCts.IsCancellationRequested, this); 85ObjectDisposedException.ThrowIf(_disposingCts.IsCancellationRequested, this); 99ObjectDisposedException.ThrowIf(_disposingCts.IsCancellationRequested, this); 115ObjectDisposedException.ThrowIf(_disposingCts.IsCancellationRequested, this);
Microsoft.AspNetCore.Components (2)
OwningComponentBase.cs (2)
40ObjectDisposedException.ThrowIf(IsDisposed, this); 118ObjectDisposedException.ThrowIf(IsDisposed, this);
Microsoft.AspNetCore.Http (1)
Internal\ReferenceReadStream.cs (1)
150ObjectDisposedException.ThrowIf(_disposed, this);
Microsoft.AspNetCore.Http.Connections.Client (1)
src\Shared\ThrowHelpers\ObjectDisposedThrowHelper.cs (1)
26ObjectDisposedException.ThrowIf(condition, instance);
Microsoft.AspNetCore.Http.Connections.Tests (1)
src\Shared\Buffers.Testing\CustomMemoryForTest.cs (1)
28ObjectDisposedException.ThrowIf(_disposed, this);
Microsoft.AspNetCore.Identity.EntityFrameworkCore (1)
RoleStore.cs (1)
322ObjectDisposedException.ThrowIf(_disposed, this);
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
Buffers\MemoryPoolViewBufferScope.cs (1)
39ObjectDisposedException.ThrowIf(_disposed, this);
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (1)
src\Shared\ThrowHelpers\ObjectDisposedThrowHelper.cs (1)
26ObjectDisposedException.ThrowIf(condition, instance);
Microsoft.AspNetCore.Server.HttpSys (4)
HttpSysListener.cs (1)
382ObjectDisposedException.ThrowIf(_state == State.Disposed, this);
NativeInterop\RequestQueue.cs (1)
191ObjectDisposedException.ThrowIf(_disposed, this);
NativeInterop\UrlGroup.cs (1)
209ObjectDisposedException.ThrowIf(_disposed, this);
RequestProcessing\ResponseBody.cs (1)
781ObjectDisposedException.ThrowIf(_disposed, this);
Microsoft.AspNetCore.Server.IIS (1)
Core\WrappingStream.cs (1)
18ObjectDisposedException.ThrowIf(_disposed, this);
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Infrastructure\WrappingStream.cs (1)
18ObjectDisposedException.ThrowIf(_disposed, this);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Shared\Buffers.Testing\CustomMemoryForTest.cs (1)
28ObjectDisposedException.ThrowIf(_disposed, this);
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\ThrowHelpers\ObjectDisposedThrowHelper.cs (1)
26ObjectDisposedException.ThrowIf(condition, instance);
Microsoft.AspNetCore.SignalR.Common.Tests (1)
src\Shared\Buffers.Testing\CustomMemoryForTest.cs (1)
28ObjectDisposedException.ThrowIf(_disposed, this);
Microsoft.AspNetCore.SignalR.Core (1)
Hub.cs (1)
113ObjectDisposedException.ThrowIf(_disposed, this);
Microsoft.AspNetCore.SignalR.Microbenchmarks (1)
src\Shared\Buffers.Testing\CustomMemoryForTest.cs (1)
28ObjectDisposedException.ThrowIf(_disposed, this);
Microsoft.AspNetCore.SpaServices.Extensions.Tests (1)
ListLoggerFactory.cs (1)
49ObjectDisposedException.ThrowIf(_disposed, nameof(ListLoggerFactory));
Microsoft.AspNetCore.TestHost (1)
TestServer.cs (1)
249ObjectDisposedException.ThrowIf(_disposed, this);
Microsoft.AspNetCore.WebSockets.Tests (1)
BufferStream.cs (1)
341ObjectDisposedException.ThrowIf(_disposed, this);
Microsoft.AspNetCore.WebUtilities (6)
BufferedReadStream.cs (1)
421ObjectDisposedException.ThrowIf(_disposed, this);
FileBufferingReadStream.cs (1)
500ObjectDisposedException.ThrowIf(_disposed, this);
FileBufferingWriteStream.cs (1)
291ObjectDisposedException.ThrowIf(Disposed, this);
HttpRequestStreamReader.cs (1)
546ObjectDisposedException.ThrowIf(_disposed, this);
HttpResponseStreamWriter.cs (1)
679ObjectDisposedException.ThrowIf(_disposed, this);
PagedByteBuffer.cs (1)
139ObjectDisposedException.ThrowIf(Disposed, this);
Microsoft.AspNetCore.WebUtilities.Microbenchmarks (1)
src\Shared\Buffers.Testing\CustomMemoryForTest.cs (1)
28ObjectDisposedException.ThrowIf(_disposed, this);
Microsoft.AspNetCore.WebUtilities.Tests (1)
src\Shared\Buffers.Testing\CustomMemoryForTest.cs (1)
28ObjectDisposedException.ThrowIf(_disposed, this);
Microsoft.CodeAnalysis (1)
DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
125ObjectDisposedException.ThrowIf(_isDisposed, this);
Microsoft.CodeAnalysis.Workspaces (1)
src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
125ObjectDisposedException.ThrowIf(_isDisposed, this);
Microsoft.Extensions.Caching.StackExchangeRedis (1)
src\Shared\ThrowHelpers\ObjectDisposedThrowHelper.cs (1)
26ObjectDisposedException.ThrowIf(condition, instance);
Microsoft.Extensions.Identity.Core (1)
src\Shared\ThrowHelpers\ObjectDisposedThrowHelper.cs (1)
26ObjectDisposedException.ThrowIf(condition, instance);
Microsoft.Extensions.ServiceDiscovery (3)
ServiceEndpointResolver.cs (2)
45ObjectDisposedException.ThrowIf(_disposed, this); 51ObjectDisposedException.ThrowIf(_disposed, this);
ServiceEndpointWatcher.cs (1)
64ObjectDisposedException.ThrowIf(_disposalCancellation.IsCancellationRequested, this);
Microsoft.Extensions.ServiceDiscovery.Dns (2)
Resolver\DnsResolver.cs (2)
63ObjectDisposedException.ThrowIf(_disposed, this); 148ObjectDisposedException.ThrowIf(_disposed, this);
Microsoft.JSInterop (2)
DotNetObjectReferenceOfT.cs (1)
97ObjectDisposedException.ThrowIf(Disposed, this);
Implementation\JSObjectReference.cs (1)
114ObjectDisposedException.ThrowIf(Disposed, this);
PresentationFramework (1)
System\Windows\Controls\WebBrowser.cs (1)
646ObjectDisposedException.ThrowIf(IsDisposed, this);
PresentationUI (1)
MS\Internal\Documents\Application\Document.cs (1)
325ObjectDisposedException.ThrowIf(_isDisposed, this);
System.Collections.Concurrent (2)
System\Collections\Concurrent\BlockingCollection.cs (1)
1724ObjectDisposedException.ThrowIf(_isDisposed, this);
System\Collections\Concurrent\PartitionerStatic.cs (1)
605ObjectDisposedException.ThrowIf(_disposed, this);
System.ComponentModel.TypeConverter (1)
System\Timers\Timer.cs (1)
137ObjectDisposedException.ThrowIf(_disposed, this);
System.Data.Common (1)
System\Data\SQLTypes\SqlXml.cs (1)
522ObjectDisposedException.ThrowIf(IsStreamClosed(), this);
System.Formats.Tar (4)
System\Formats\Tar\SubReadStream.cs (1)
88ObjectDisposedException.ThrowIf(_isDisposed, this);
System\Formats\Tar\TarWriter.cs (3)
237ObjectDisposedException.ThrowIf(_isDisposed, this); 286ObjectDisposedException.ThrowIf(_isDisposed, this); 385ObjectDisposedException.ThrowIf(_isDisposed, this);
System.IO.FileSystem.Watcher (1)
System\IO\FileSystemWatcher.cs (1)
636ObjectDisposedException.ThrowIf(_disposed, this);
System.Memory (1)
System\Buffers\ArrayMemoryPool.ArrayMemoryPoolBuffer.cs (1)
22ObjectDisposedException.ThrowIf(array is null, this);
System.Net.HttpListener (3)
System\Net\HttpListener.cs (1)
314ObjectDisposedException.ThrowIf(_state == State.Closed, this);
System\Net\HttpListenerResponse.cs (1)
270ObjectDisposedException.ThrowIf(Disposed, this);
System\Net\Managed\HttpResponseStream.Managed.cs (1)
94ObjectDisposedException.ThrowIf(_closed, this);
System.Net.Mail (19)
System\Net\Mail\AlternateView.cs (1)
45ObjectDisposedException.ThrowIf(disposed, this);
System\Net\Mail\AlternateViewCollection.cs (4)
32ObjectDisposedException.ThrowIf(_disposed, this); 39ObjectDisposedException.ThrowIf(_disposed, this); 47ObjectDisposedException.ThrowIf(_disposed, this); 54ObjectDisposedException.ThrowIf(_disposed, this);
System\Net\Mail\Attachment.cs (1)
189ObjectDisposedException.ThrowIf(disposed, this);
System\Net\Mail\AttachmentCollection.cs (4)
33ObjectDisposedException.ThrowIf(_disposed, this); 40ObjectDisposedException.ThrowIf(_disposed, this); 47ObjectDisposedException.ThrowIf(_disposed, this); 54ObjectDisposedException.ThrowIf(_disposed, this);
System\Net\Mail\LinkedResourceCollection.cs (4)
32ObjectDisposedException.ThrowIf(_disposed, this); 39ObjectDisposedException.ThrowIf(_disposed, this); 46ObjectDisposedException.ThrowIf(_disposed, this); 53ObjectDisposedException.ThrowIf(_disposed, this);
System\Net\Mail\MailMessage.cs (2)
282ObjectDisposedException.ThrowIf(_disposed, this); 291ObjectDisposedException.ThrowIf(_disposed, this);
System\Net\Mail\SmtpClient.cs (3)
387ObjectDisposedException.ThrowIf(_disposed, this); 587ObjectDisposedException.ThrowIf(_disposed, this); 623ObjectDisposedException.ThrowIf(_disposed, this);
System.Net.Ping (2)
System\Net\NetworkInformation\Ping.cs (2)
47ObjectDisposedException.ThrowIf(_disposeRequested, this); 75ObjectDisposedException.ThrowIf(_disposeRequested, this);
System.Net.WebSockets.Client (1)
System\Net\WebSockets\ClientWebSocket.cs (1)
170ObjectDisposedException.ThrowIf(_state == InternalState.Disposed, this);
System.Private.CoreLib (22)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SafeHandle.cs (2)
172ObjectDisposedException.ThrowIf((oldState & StateBits.Closed) != 0, this); 229ObjectDisposedException.ThrowIf((oldState & StateBits.RefCount) == 0, this);
src\libraries\System.Private.CoreLib\src\System\Security\SecureString.cs (1)
303ObjectDisposedException.ThrowIf(_buffer == null, this);
src\libraries\System.Private.CoreLib\src\System\Threading\ManualResetEventSlim.cs (3)
81ObjectDisposedException.ThrowIf(IsDisposed, this); 324ObjectDisposedException.ThrowIf(IsDisposed, this); 489ObjectDisposedException.ThrowIf(IsDisposed, this);
src\libraries\System.Private.CoreLib\src\System\Threading\ReaderWriterLockSlim.cs (3)
297ObjectDisposedException.ThrowIf(_fDisposed, this); 443ObjectDisposedException.ThrowIf(_fDisposed, this); 650ObjectDisposedException.ThrowIf(_fDisposed, this);
src\libraries\System.Private.CoreLib\src\System\Threading\SemaphoreSlim.cs (1)
927ObjectDisposedException.ThrowIf(m_lockObjAndDisposed.Value, this);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadLocal.cs (6)
309ObjectDisposedException.ThrowIf(id < 0, this); 339ObjectDisposedException.ThrowIf(id < 0, this); 375ObjectDisposedException.ThrowIf(!_initialized, this); 394ObjectDisposedException.ThrowIf(!_initialized, this); 434ObjectDisposedException.ThrowIf(list is null, this); 486ObjectDisposedException.ThrowIf(id < 0, this);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolBoundHandle.Portable.cs (2)
28ObjectDisposedException.ThrowIf(_isDisposed, this); 38ObjectDisposedException.ThrowIf(_isDisposed, this);
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (4)
118ObjectDisposedException.ThrowIf(waitHandle is null, this); 253ObjectDisposedException.ThrowIf(safeWaitHandle is null, waitHandle); // throw ObjectDisposedException for backward compatibility even though it is not representative of the issue 461ObjectDisposedException.ThrowIf(safeWaitHandleToSignal is null, toSignal); // throw ObjectDisposedException for backward compatibility even though it is not representative of the issue 462ObjectDisposedException.ThrowIf(safeWaitHandleToWaitOn is null, toWaitOn);
System.Private.DataContractSerialization (1)
System\Xml\XmlCanonicalWriter.cs (1)
616ObjectDisposedException.ThrowIf(_writer is null, this);
System.Runtime.InteropServices (1)
System\Runtime\InteropServices\Marshalling\ComObject.cs (1)
120ObjectDisposedException.ThrowIf(_released, this);
System.Threading (9)
System\Threading\Barrier.cs (3)
323ObjectDisposedException.ThrowIf(_disposed, this); 419ObjectDisposedException.ThrowIf(_disposed, this); 627ObjectDisposedException.ThrowIf(_disposed, this);
System\Threading\CountdownEvent.cs (6)
121ObjectDisposedException.ThrowIf(_disposed, this); 175ObjectDisposedException.ThrowIf(_disposed, this); 218ObjectDisposedException.ThrowIf(_disposed, this); 322ObjectDisposedException.ThrowIf(_disposed, this); 380ObjectDisposedException.ThrowIf(_disposed, this); 541ObjectDisposedException.ThrowIf(_disposed, this);
System.Transactions.Local (21)
System\Transactions\CommittableTransaction.cs (2)
55ObjectDisposedException.ThrowIf(Disposed, this); 89ObjectDisposedException.ThrowIf(Disposed, this);
System\Transactions\DependentTransaction.cs (1)
42ObjectDisposedException.ThrowIf(Disposed, this);
System\Transactions\Transaction.cs (16)
355ObjectDisposedException.ThrowIf(Disposed, this); 387ObjectDisposedException.ThrowIf(Disposed, this); 419ObjectDisposedException.ThrowIf(Disposed, this); 455ObjectDisposedException.ThrowIf(Disposed, this); 481ObjectDisposedException.ThrowIf(Disposed, this); 529ObjectDisposedException.ThrowIf(Disposed, this); 572ObjectDisposedException.ThrowIf(Disposed, this); 596ObjectDisposedException.ThrowIf(Disposed, this); 621ObjectDisposedException.ThrowIf(Disposed, this); 660ObjectDisposedException.ThrowIf(Disposed, this); 698ObjectDisposedException.ThrowIf(Disposed, this); 746ObjectDisposedException.ThrowIf(Disposed, this); 793ObjectDisposedException.ThrowIf(Disposed, this); 901ObjectDisposedException.ThrowIf(Disposed, this); 942ObjectDisposedException.ThrowIf(Disposed, this); 986ObjectDisposedException.ThrowIf(Disposed, this);
System\Transactions\TransactionInteropNonWindows.cs (1)
15ObjectDisposedException.ThrowIf(transaction.Disposed, transaction);
System\Transactions\TransactionScope.cs (1)
835ObjectDisposedException.ThrowIf(_disposed, this);
System.Windows.Forms (6)
System\Windows\Forms\Control.cs (1)
4542ObjectDisposedException.ThrowIf(GetState(States.Disposed), this);
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (1)
131ObjectDisposedException.ThrowIf(_control is null, _control);
System\Windows\Forms\Controls\WebBrowser\HtmlHistory.cs (1)
24ObjectDisposedException.ThrowIf(_disposed, this);
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (1)
1396ObjectDisposedException.ThrowIf(IsDisposed, this);
System\Windows\Forms\Input\Cursor.cs (1)
160ObjectDisposedException.ThrowIf(_handle.IsNull, this);
System\Windows\Forms\WindowSubclassHandler.cs (1)
87ObjectDisposedException.ThrowIf(_disposed, this);
System.Windows.Forms.Design (8)
System\ComponentModel\Design\DesignSurface.cs (7)
75ObjectDisposedException.ThrowIf(_host is null, this); 108ObjectDisposedException.ThrowIf(_serviceContainer is null, this); 128ObjectDisposedException.ThrowIf(_host is null, this); 226ObjectDisposedException.ThrowIf(_host is null, this); 241ObjectDisposedException.ThrowIf(_host is null, this); 260ObjectDisposedException.ThrowIf(_host is null, this); 319ObjectDisposedException.ThrowIf(_host is null, this);
System\ComponentModel\Design\Serialization\BasicDesignerLoader.cs (1)
86ObjectDisposedException.ThrowIf(_hostInitialized, this);