4 writes to _handle
System (4)
sys\system\io\ports\SerialStream.cs (4)
675
_handle
= tempHandle;
780
_handle
= null;
852
_handle
= null;
857
_handle
= null;
59 references to _handle
System (59)
sys\system\io\ports\SerialStream.cs (59)
103
get { return (
_handle
!= null); }
112
get { return (
_handle
!= null); }
117
get { return (
_handle
!= null); }
165
if (UnsafeNativeMethods.SetCommState(
_handle
, ref dcb) == false)
178
if (UnsafeNativeMethods.SetCommBreak(
_handle
) == false)
183
if (UnsafeNativeMethods.ClearCommBreak(
_handle
) == false)
201
if (UnsafeNativeMethods.SetCommState(
_handle
, ref dcb) == false)
222
if (UnsafeNativeMethods.SetCommState(
_handle
, ref dcb) == false)
244
if (UnsafeNativeMethods.SetCommState(
_handle
, ref dcb) == false)
251
if (!UnsafeNativeMethods.EscapeCommFunction(
_handle
, value ? NativeMethods.SETDTR : NativeMethods.CLRDTR))
296
if (UnsafeNativeMethods.SetCommState(
_handle
, ref dcb) == false)
312
return
_handle
!= null && !eventRunner.ShutdownLoop;
347
if (UnsafeNativeMethods.SetCommState(
_handle
, ref dcb) == false)
388
if (UnsafeNativeMethods.SetCommState(
_handle
, ref dcb) == false)
425
if (
_handle
== null) InternalResources.FileNotOpen();
448
if (UnsafeNativeMethods.SetCommTimeouts(
_handle
, ref commTimeouts) == false)
481
if (UnsafeNativeMethods.SetCommState(
_handle
, ref dcb) == false)
489
if (!UnsafeNativeMethods.EscapeCommFunction(
_handle
, value ? NativeMethods.SETRTS : NativeMethods.CLRRTS))
529
if (UnsafeNativeMethods.SetCommState(
_handle
, ref dcb) == false)
551
if (
_handle
== null) InternalResources.FileNotOpen();
556
if (UnsafeNativeMethods.SetCommTimeouts(
_handle
, ref commTimeouts) == false)
573
if (UnsafeNativeMethods.GetCommModemStatus(
_handle
, ref pinStatus) == false)
586
if (UnsafeNativeMethods.GetCommModemStatus(
_handle
, ref pinStatus) == false)
598
if (UnsafeNativeMethods.GetCommModemStatus(
_handle
, ref pinStatus) == false)
612
if (UnsafeNativeMethods.ClearCommError(
_handle
, ref errorCode, ref comStat) == false)
626
if (UnsafeNativeMethods.ClearCommError(
_handle
, ref errorCode, ref comStat) == false)
695
if (!UnsafeNativeMethods.GetCommProperties(
_handle
, ref commProp)
696
|| !UnsafeNativeMethods.GetCommModemStatus(
_handle
, ref pinStatus))
751
if (UnsafeNativeMethods.SetCommTimeouts(
_handle
, ref commTimeouts) == false)
757
if (!ThreadPool.BindHandle(
_handle
))
764
UnsafeNativeMethods.SetCommMask(
_handle
, NativeMethods.ALL_EVENTS);
794
if (
_handle
!= null && !
_handle
.IsInvalid) {
804
UnsafeNativeMethods.SetCommMask(
_handle
, 0);
805
if (!UnsafeNativeMethods.EscapeCommFunction(
_handle
, NativeMethods.CLRDTR))
828
if (!skipSPAccess && !
_handle
.IsClosed) {
851
_handle
.Close();
856
_handle
.Close();
879
if (
_handle
== null) InternalResources.FileNotOpen();
913
if (
_handle
== null) InternalResources.FileNotOpen();
934
if (UnsafeNativeMethods.PurgeComm(
_handle
, NativeMethods.PURGE_RXCLEAR | NativeMethods.PURGE_RXABORT) == false)
941
if (UnsafeNativeMethods.PurgeComm(
_handle
, NativeMethods.PURGE_TXCLEAR | NativeMethods.PURGE_TXABORT) == false)
1070
if (
_handle
== null) throw new ObjectDisposedException(SR.GetString(SR.Port_not_open));
1071
UnsafeNativeMethods.FlushFileBuffers(
_handle
);
1096
if (
_handle
== null) InternalResources.FileNotOpen();
1124
if (
_handle
== null) InternalResources.FileNotOpen();
1156
if (
_handle
== null) InternalResources.FileNotOpen();
1158
if (!UnsafeNativeMethods.SetupComm(
_handle
, readBufferSize, writeBufferSize))
1184
if (
_handle
== null) InternalResources.FileNotOpen();
1224
if (
_handle
== null) InternalResources.FileNotOpen();
1267
if (UnsafeNativeMethods.GetCommState(
_handle
, ref dcb) == false)
1358
if (UnsafeNativeMethods.SetCommState(
_handle
, ref dcb) == false)
1554
r = UnsafeNativeMethods.ReadFile(
_handle
, p + offset, count, IntPtr.Zero, overlapped);
1556
r = UnsafeNativeMethods.ReadFile(
_handle
, p + offset, count, out numBytesRead, IntPtr.Zero);
1572
_handle
.SetHandleAsInvalid();
1604
r = UnsafeNativeMethods.WriteFile(
_handle
, p + offset, count, IntPtr.Zero, overlapped);
1606
r = UnsafeNativeMethods.WriteFile(
_handle
, p + offset, count, out numBytesWritten, IntPtr.Zero);
1621
_handle
.SetHandleAsInvalid();
1688
handle = stream.
_handle
;