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