188 references to IsClosed
mscorlib (47)
system\io\filestream.cs (29)
357Contract.Assert(!wh.SafeWaitHandle.IsClosed, "ManualResetEvent already closed!"); 1177if (_handle.IsClosed) __Error.FileNotOpen(); 1224if (_handle.IsClosed) __Error.FileNotOpen(); 1254if (_handle.IsClosed) __Error.FileNotOpen(); 1265if (_handle.IsClosed) __Error.FileNotOpen(); 1281if (_handle != null && !_handle.IsClosed) { 1293if (_handle != null && !_handle.IsClosed) 1311BCLDebug.Correctness(_handle.IsClosed, "You didn't close a FileStream & it got finalized. Name: \""+_fileName+"\""); 1325if (_handle.IsClosed) __Error.FileNotOpen(); 1449if (_handle.IsClosed) __Error.FileNotOpen(); 1508if (_handle.IsClosed) __Error.FileNotOpen(); 1570Contract.Assert(!_handle.IsClosed, "!_handle.IsClosed"); 1613if (_handle.IsClosed) __Error.FileNotOpen(); 1691Contract.Assert(!_handle.IsClosed && CanSeek, "!_handle.IsClosed && CanSeek"); 1762if (_handle.IsClosed) __Error.FileNotOpen(); 1826Contract.Assert(!_handle.IsClosed, "!_handle.IsClosed"); 1882if (_handle.IsClosed) __Error.FileNotOpen(); 2012Contract.Assert(!_handle.IsClosed, "!_handle.IsClosed"); 2091if (!_handle.IsClosed && CanSeek) // Update Position - It could be anywhere. 2161if (_handle.IsClosed) __Error.FileNotOpen(); 2194if (_handle.IsClosed) __Error.FileNotOpen(); 2272Contract.Assert(!_handle.IsClosed, "!_handle.IsClosed"); 2348if (!_handle.IsClosed && CanSeek) // Update Position - It could be anywhere. 2416if (_handle.IsClosed) __Error.FileNotOpen(); 2437if (_handle.IsClosed) __Error.FileNotOpen(); 2453if (_handle.IsClosed) __Error.FileNotOpen(); 2625if (_handle.IsClosed) 2677if (_handle.IsClosed) 2840if (_handle.IsClosed)
system\io\isolatedstorage\isolatedstoragefile.cs (1)
2086get { return m_handle == null || m_handle.IsClosed || m_handle.IsInvalid; }
system\security\cryptography\cryptoapitransform.cs (2)
147if (_safeKeyHandle != null && !_safeKeyHandle.IsClosed) { 150if (_safeProvHandle != null && !_safeProvHandle.IsClosed) {
system\security\cryptography\dsacryptoserviceprovider.cs (3)
104if (_safeKeyHandle != null && !_safeKeyHandle.IsClosed) 106if (_safeProvHandle != null && !_safeProvHandle.IsClosed) 218if (_safeKeyHandle != null && !_safeKeyHandle.IsClosed)
system\security\cryptography\md5cryptoserviceprovider.cs (2)
41if (_safeHashHandle != null && !_safeHashHandle.IsClosed) 52if (_safeHashHandle != null && !_safeHashHandle.IsClosed)
system\security\cryptography\rsacryptoserviceprovider.cs (3)
151if (_safeKeyHandle != null && !_safeKeyHandle.IsClosed) 153if (_safeProvHandle != null && !_safeProvHandle.IsClosed) 276if (_safeKeyHandle != null && !_safeKeyHandle.IsClosed) {
system\security\cryptography\sha1cryptoserviceprovider.cs (2)
33if (_safeHashHandle != null && !_safeHashHandle.IsClosed) 45if (_safeHashHandle != null && !_safeHashHandle.IsClosed)
system\security\cryptography\utils.cs (1)
421if (safeKeyHandle != null && !safeKeyHandle.IsClosed)
system\security\policy\pefileevidencefactory.cs (1)
66!peFile.IsClosed &&
system\security\principal\windowsidentity.cs (2)
691if (m_safeTokenHandle != null && !m_safeTokenHandle.IsClosed) 886Contract.Assert(!m_safeTokenHandle.IsInvalid && !m_safeTokenHandle.IsClosed, "!m_safeTokenHandle.IsInvalid && !m_safeTokenHandle.IsClosed");
system\security\principal\windowsimpersonationcontext.cs (1)
141if (m_safeTokenHandle != null && !m_safeTokenHandle.IsClosed) {
PresentationCore (4)
Core\CSharp\MS\Internal\IO\Packaging\ByteRangeDownloader.cs (2)
474if (eventHandle.IsInvalid || eventHandle.IsClosed) 562if (_eventHandle != null && !_eventHandle.IsInvalid && !_eventHandle.IsClosed)
Core\CSharp\MS\Win32\UnsafeNativeMethodsTablet.cs (2)
167return IsClosed || handle == IntPtr.Zero; 226return IsClosed || handle == IntPtr.Zero;
PresentationFramework (1)
src\Framework\System\Windows\Interop\DocobjHost.cs (1)
843if (eventHandle.IsInvalid || eventHandle.IsClosed)
System (15)
net\System\Net\_NTAuthentication.cs (1)
606if (m_SecurityContext != null && !m_SecurityContext.IsClosed)
net\System\Net\_SafeNetHandles.cs (4)
1083get {return IsClosed || _handle.IsZero;} 1418return IsClosed || _handle.IsZero; 2429return IsClosed || base.IsInvalid; 2562return IsClosed || base.IsInvalid;
net\System\Net\_SslSessionsCache.cs (1)
212if (!creds.IsClosed && !creds.IsInvalid && (cached = SafeCredentialReference.CreateReference(creds)) != null)
net\System\Net\WebSockets\WebSocketBase.cs (1)
482if (SessionHandle != null && !SessionHandle.IsClosed && !SessionHandle.IsInvalid)
net\System\Net\WebSockets\WebSocketProtocolComponent.cs (2)
723if (webSocket.SessionHandle.IsClosed) 883if (webSocket.SessionHandle.IsClosed)
security\system\security\cryptography\x509\x509store.cs (5)
125if (m_safeCertStoreHandle == null || m_safeCertStoreHandle.IsInvalid || m_safeCertStoreHandle.IsClosed) 184if (m_safeCertStoreHandle != null && !m_safeCertStoreHandle.IsClosed) 195if (m_safeCertStoreHandle == null || m_safeCertStoreHandle.IsInvalid || m_safeCertStoreHandle.IsClosed) 256if (m_safeCertStoreHandle.IsInvalid || m_safeCertStoreHandle.IsClosed) 273if (safeCertStoreHandle == null || safeCertStoreHandle.IsInvalid || safeCertStoreHandle.IsClosed)
sys\system\io\ports\SerialStream.cs (1)
828if (!skipSPAccess && !_handle.IsClosed) {
System.Core (95)
Microsoft\Win32\SafeHandles\CapiSafeHandles.cs (3)
292Contract.Requires(!IsInvalid && !IsClosed); 293Contract.Ensures(Contract.Result<SafeCapiKeyHandle>() != null && !Contract.Result<SafeCapiKeyHandle>().IsInvalid && !Contract.Result<SafeCapiKeyHandle>().IsClosed); 371Contract.Requires(!IsInvalid && !IsClosed);
Microsoft\Win32\SafeHandles\NCryptSafeHandles.cs (2)
83if (parentHandle.IsClosed || parentHandle.IsInvalid) 419Contract.Requires(!IsClosed);
System\Diagnostics\Eventing\Reader\CoTaskMemSafeHandle.cs (1)
45return IsClosed || handle == IntPtr.Zero;
System\Diagnostics\Eventing\Reader\CoTaskMemUnicodeSafeHandle.cs (1)
50return IsClosed || handle == IntPtr.Zero;
System\Diagnostics\Eventing\Reader\EventLogHandle.cs (1)
43return IsClosed || handle == IntPtr.Zero;
System\IO\LogStream.cs (5)
249if (_handle.IsClosed) __Error.FileNotOpen(); 306Debug.Assert(!_handle.IsClosed, "!_handle.IsClosed"); 335if (_handle == null || _handle.IsClosed) { 346if (_handle != null && !_handle.IsClosed) 397if (handle != null && !handle.IsClosed) {
System\IO\MemoryMappedFiles\MemoryMappedFile.cs (5)
40Debug.Assert(handle != null && !handle.IsClosed && !handle.IsInvalid, "handle is null, closed, or invalid"); 48Debug.Assert(handle != null && !handle.IsClosed && !handle.IsInvalid, "handle is null, closed, or invalid"); 614if (_handle != null && !_handle.IsClosed) { 635if (_handle.IsClosed) { 650if (_handle.IsClosed) {
System\IO\MemoryMappedFiles\MemoryMappedView.cs (2)
236if (m_viewHandle != null && !m_viewHandle.IsClosed) { 251return (m_viewHandle == null || m_viewHandle.IsClosed);
System\IO\Pipes\Pipe.cs (5)
175if (m_clientHandle != null && !m_clientHandle.IsClosed) { 184if (!m_clientHandleExposed && m_clientHandle != null && !m_clientHandle.IsClosed) { 911Debug.Assert(!wh.SafeWaitHandle.IsClosed, "ManualResetEvent already closed!"); 941if (InternalHandle.IsClosed) { 968if (InternalHandle.IsClosed) {
System\IO\Pipes\PipeStream.cs (12)
205Debug.Assert(!m_handle.IsClosed, "_handle is closed"); 284Debug.Assert(!m_handle.IsClosed, "_handle is closed"); 447Debug.Assert(!m_handle.IsClosed, "_handle is closed"); 500Debug.Assert(!m_handle.IsClosed, "_handle is closed"); 769if (m_handle != null && !m_handle.IsClosed) { 818if (m_handle.IsClosed) { 969if (m_handle.IsClosed) { 995if (m_handle.IsClosed) { 1077if (m_handle.IsClosed) { 1103if (m_handle.IsClosed) { 1133if (m_handle.IsClosed) { 1262Debug.Assert(!wh.SafeWaitHandle.IsClosed, "ManualResetEvent already closed!");
System\Security\Cryptography\AesCryptoServiceProvider.cs (9)
38Contract.Ensures(m_cspHandle != null && !m_cspHandle.IsInvalid && !m_cspHandle.IsClosed); 76Contract.Ensures(m_key != null && !m_key.IsInvalid && !m_key.IsClosed); 80if (m_key == null || m_key.IsInvalid || m_key.IsClosed) { 93Contract.Ensures(m_key != null && !m_key.IsInvalid && !m_key.IsClosed); 147if (m_key == null || m_key.IsInvalid || m_key.IsClosed) { 208if (m_key == null || m_key.IsInvalid || m_key.IsClosed) { 271Contract.Ensures(!disposing || m_key == null || m_key.IsClosed); 272Contract.Ensures(!disposing || m_cspHandle == null || m_cspHandle.IsClosed); 369Contract.Ensures(m_key != null && !m_key.IsInvalid & !m_key.IsClosed);
System\Security\Cryptography\BCryptHashAlgorithm.cs (5)
70Contract.Ensures(m_algorithmHandle != null && !m_algorithmHandle.IsInvalid && !m_algorithmHandle.IsClosed); 71Contract.Ensures(m_hashHandle != null && !m_hashHandle.IsInvalid && !m_hashHandle.IsClosed); 93Contract.Ensures(m_hashHandle == null || m_hashHandle.IsClosed); 94Contract.Ensures(m_algorithmHandle == null || m_algorithmHandle.IsClosed); 114Contract.Ensures(m_hashHandle != null && !m_hashHandle.IsInvalid && !m_hashHandle.IsClosed);
System\Security\Cryptography\BCryptNative.cs (1)
583!Contract.Result<SafeBCryptAlgorithmHandle>().IsClosed);
System\Security\Cryptography\CapiHashAlgorithm.cs (5)
34Contract.Ensures(m_cspHandle != null && !m_cspHandle.IsInvalid && !m_cspHandle.IsClosed); 35Contract.Ensures(m_hashHandle != null && !m_hashHandle.IsInvalid && !m_hashHandle.IsClosed); 48Contract.Ensures(m_hashHandle == null || m_hashHandle.IsClosed); 49Contract.Ensures(m_cspHandle == null || m_cspHandle.IsClosed); 66Contract.Ensures(m_hashHandle != null && !m_hashHandle.IsInvalid && !m_hashHandle.IsClosed);
System\Security\Cryptography\CapiNative.cs (3)
513!Contract.Result<SafeCspHandle>().IsClosed); 723!Contract.Result<SafeCapiKeyHandle>().IsClosed); 789Contract.Requires(key != null && !key.IsInvalid && !key.IsClosed);
System\Security\Cryptography\CapiSymmetricAlgorithm.cs (6)
52Contract.Requires(provider != null && !provider.IsInvalid && !provider.IsClosed); 53Contract.Requires(key != null && !key.IsInvalid && !key.IsClosed); 54Contract.Ensures(m_provider != null && !m_provider.IsInvalid && !m_provider.IsClosed); 86Contract.Ensures(m_key == null || m_key.IsClosed); 87Contract.Ensures(m_provider == null || m_provider.IsClosed); 586!Contract.Result<SafeCapiKeyHandle>().IsClosed);
System\Security\Cryptography\CngKey.cs (6)
39Contract.Requires(keyHandle != null && !keyHandle.IsInvalid && !keyHandle.IsClosed); 40Contract.Requires(kspHandle != null && !kspHandle.IsInvalid && !kspHandle.IsClosed); 41Contract.Ensures(m_keyHandle != null && !m_keyHandle.IsInvalid && !m_keyHandle.IsClosed); 42Contract.Ensures(kspHandle != null && !kspHandle.IsInvalid && !kspHandle.IsClosed); 728if (keyHandle.IsClosed || keyHandle.IsInvalid) { 797Contract.Requires(keyHandle != null && !keyHandle.IsInvalid && !keyHandle.IsClosed);
System\Security\Cryptography\NCryptNative.cs (16)
545Debug.Assert(!key.IsClosed && !key.IsInvalid, "!key.IsClosed && !key.IsInvalid"); 658Debug.Assert(!key.IsClosed && !key.IsInvalid, "!key.IsClosed && !key.IsInvalid"); 756Debug.Assert(!key.IsInvalid && !key.IsClosed, "!key.IsInvalid && !key.IsClosed"); 798Debug.Assert(!key.IsClosed && !key.IsInvalid, "!key.IsClosed && !key.IsInvalid"); 821Debug.Assert(!key.IsClosed && !key.IsInvalid, "!key.IsClosed && !key.IsInvalid"); 848Debug.Assert(!key.IsClosed && !key.IsInvalid, "!key.IsClosed && !key.IsInvalid"); 872Debug.Assert(!key.IsClosed && !key.IsInvalid, "!key.IsClosed && !key.IsInvalid"); 898Debug.Assert(!key.IsClosed && !key.IsInvalid, "!key.IsClosed && !key.IsInvalid"); 979Contract.Requires(provider != null && !provider.IsInvalid && !provider.IsClosed); 983!Contract.Result<SafeNCryptKeyHandle>().IsClosed); 1241!Contract.Result<SafeNCryptSecretHandle>().IsClosed && 1331Contract.Requires(key != null && !key.IsInvalid && !key.IsClosed); 1537!Contract.Result<SafeNCryptKeyHandle>().IsClosed); 1566!Contract.Result<SafeNCryptKeyHandle>().IsClosed); 1593Contract.Requires(provider != null && !provider.IsInvalid && !provider.IsClosed); 1614!Contract.Result<SafeNCryptProviderHandle>().IsClosed);
System\Security\Cryptography\X509Certificates\X509Native.cs (7)
28Debug.Assert(!certificateContext.IsClosed && !certificateContext.IsInvalid, 51Debug.Assert(!certificateContext.IsClosed && !certificateContext.IsInvalid, 119Debug.Assert(!certificateContext.IsClosed && !certificateContext.IsInvalid, 152Debug.Assert(!certificateContext.IsClosed && !certificateContext.IsInvalid, 171Debug.Assert(!certificateContext.IsClosed && !certificateContext.IsInvalid, 187Debug.Assert(!certificateContext.IsClosed && !certificateContext.IsInvalid, 191Debug.Assert(!keyHandle.IsClosed && !keyHandle.IsInvalid,
System.IdentityModel (2)
System\IdentityModel\SspiSafeHandles.cs (2)
153return IsClosed || _handle.IsZero; 972get { return IsClosed || _handle.IsZero; }
System.IO.Log (5)
System\IO\Log\CoTaskMemHandle.cs (1)
22return IsClosed || this.handle == IntPtr.Zero;
System\IO\Log\SafeArchiveContext.cs (1)
22return IsClosed || this.handle == IntPtr.Zero;
System\IO\Log\SafeMarshalContext.cs (1)
22return IsClosed || this.handle == IntPtr.Zero;
System\IO\Log\SafeReadContext.cs (1)
23return IsClosed || this.handle == IntPtr.Zero;
System\IO\Log\SmuggledIUnknown.cs (1)
33return (IsClosed || (IntPtr.Zero == base.handle));
System.Messaging (4)
System\Messaging\Interop\SafeHandles.cs (4)
30get { return base.IsInvalid || IsClosed; } 65get { return base.IsInvalid || IsClosed; } 100get { return base.IsInvalid || IsClosed; } 139get { return base.IsInvalid || IsClosed; }
System.Net (4)
net\PeerToPeer\Collaboration\Peer.cs (1)
1119if (!m_SafeCollabInvite.IsInvalid && !m_SafeCollabInvite.IsClosed){
net\PeerToPeer\PeerNameRegistration.cs (1)
631 if(m_RegistrationHandle.IsInvalid || m_RegistrationHandle.IsClosed)
net\PeerToPeer\PeerNameResolver.cs (1)
224if (!m_SafePeerNameEndResolve.IsInvalid && !m_SafePeerNameEndResolve.IsClosed)
net\PeerToPeer\UnsafePeerToPeerMethods.cs (1)
344if (!s_P2PLibrary.IsClosed && !s_P2PLibrary.IsInvalid)
System.ServiceModel (1)
System\ServiceModel\Channels\ChannelBindingUtility.cs (1)
215if (source.IsInvalid || source.IsClosed)
System.Transactions (2)
System\Transactions\Oletx\CoTaskMemHandle.cs (1)
24return IsClosed || this.handle == IntPtr.Zero;
System\Transactions\SafeIUnknown.cs (1)
42return (IsClosed || (IntPtr.Zero == base.handle));
System.Windows.Forms (1)
winforms\Managed\System\WinForms\Control.cs (1)
17842if (!base.IsClosed) {
WindowsBase (2)
Base\MS\Internal\Security\RightsManagement\IssuanceLicense.cs (1)
106Debug.Assert(!boundLicenseHandle.IsClosed); // it must be either present or not
Base\System\Windows\SplashScreen.cs (1)
367if (_hBitmap != null && !_hBitmap.IsClosed)
WsatConfig (2)
Configuration\ClusterSafeNativeMethods.cs (1)
29get { return IsClosed || handle == IntPtr.Zero; }
Configuration\SafeIUnknown.cs (1)
42return (IsClosed || (IntPtr.Zero == base.handle));
WsatUI (3)
Configuration\ClusterSafeNativeMethods.cs (1)
29get { return IsClosed || handle == IntPtr.Zero; }
Configuration\SafeIUnknown.cs (1)
42return (IsClosed || (IntPtr.Zero == base.handle));
MMCUI\WSATPropertySheet.cs (1)
184if (!dlgTemplate.IsClosed)