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