1 // Licensed to the .NET Foundation under one or more agreements. 2 // The .NET Foundation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 namespace System.IO.Ports 6 { 7 public enum Handshake 8 { 9 None = 0, 10 RequestToSend = 2, 11 RequestToSendXOnXOff = 3, 12 XOnXOff = 1, 13 } 14 public enum Parity 15 { 16 Even = 2, 17 Mark = 3, 18 None = 0, 19 Odd = 1, 20 Space = 4, 21 } 22 public enum SerialData 23 { 24 Chars = 1, 25 Eof = 2, 26 } 27 public partial class SerialDataReceivedEventArgs : System.EventArgs 28 { SerialDataReceivedEventArgs()29 internal SerialDataReceivedEventArgs() { } 30 public System.IO.Ports.SerialData EventType { get { throw null; } } 31 } SerialDataReceivedEventHandler(object sender, System.IO.Ports.SerialDataReceivedEventArgs e)32 public delegate void SerialDataReceivedEventHandler(object sender, System.IO.Ports.SerialDataReceivedEventArgs e); 33 public enum SerialError 34 { 35 Frame = 8, 36 Overrun = 2, 37 RXOver = 1, 38 RXParity = 4, 39 TXFull = 256, 40 } 41 public partial class SerialErrorReceivedEventArgs : System.EventArgs 42 { SerialErrorReceivedEventArgs()43 internal SerialErrorReceivedEventArgs() { } 44 public System.IO.Ports.SerialError EventType { get { throw null; } } 45 } SerialErrorReceivedEventHandler(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e)46 public delegate void SerialErrorReceivedEventHandler(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e); 47 public enum SerialPinChange 48 { 49 Break = 64, 50 CDChanged = 32, 51 CtsChanged = 8, 52 DsrChanged = 16, 53 Ring = 256, 54 } 55 public partial class SerialPinChangedEventArgs : System.EventArgs 56 { SerialPinChangedEventArgs()57 internal SerialPinChangedEventArgs() { } 58 public System.IO.Ports.SerialPinChange EventType { get { throw null; } } 59 } SerialPinChangedEventHandler(object sender, System.IO.Ports.SerialPinChangedEventArgs e)60 public delegate void SerialPinChangedEventHandler(object sender, System.IO.Ports.SerialPinChangedEventArgs e); 61 public partial class SerialPort : System.ComponentModel.Component 62 { 63 public const int InfiniteTimeout = -1; SerialPort()64 public SerialPort() { } SerialPort(System.ComponentModel.IContainer container)65 public SerialPort(System.ComponentModel.IContainer container) { } SerialPort(string portName)66 public SerialPort(string portName) { } SerialPort(string portName, int baudRate)67 public SerialPort(string portName, int baudRate) { } SerialPort(string portName, int baudRate, System.IO.Ports.Parity parity)68 public SerialPort(string portName, int baudRate, System.IO.Ports.Parity parity) { } SerialPort(string portName, int baudRate, System.IO.Ports.Parity parity, int dataBits)69 public SerialPort(string portName, int baudRate, System.IO.Ports.Parity parity, int dataBits) { } SerialPort(string portName, int baudRate, System.IO.Ports.Parity parity, int dataBits, System.IO.Ports.StopBits stopBits)70 public SerialPort(string portName, int baudRate, System.IO.Ports.Parity parity, int dataBits, System.IO.Ports.StopBits stopBits) { } 71 public System.IO.Stream BaseStream { get { throw null; } } 72 public int BaudRate { get { throw null; } set { } } 73 public bool BreakState { get { throw null; } set { } } 74 public int BytesToRead { get { throw null; } } 75 public int BytesToWrite { get { throw null; } } 76 public bool CDHolding { get { throw null; } } 77 public bool CtsHolding { get { throw null; } } 78 public int DataBits { get { throw null; } set { } } 79 public bool DiscardNull { get { throw null; } set { } } 80 public bool DsrHolding { get { throw null; } } 81 public bool DtrEnable { get { throw null; } set { } } 82 public System.Text.Encoding Encoding { get { throw null; } set { } } 83 public System.IO.Ports.Handshake Handshake { get { throw null; } set { } } 84 public bool IsOpen { get { throw null; } } 85 public string NewLine { get { throw null; } set { } } 86 public System.IO.Ports.Parity Parity { get { throw null; } set { } } 87 public byte ParityReplace { get { throw null; } set { } } 88 public string PortName { get { throw null; } set { } } 89 public int ReadBufferSize { get { throw null; } set { } } 90 public int ReadTimeout { get { throw null; } set { } } 91 public int ReceivedBytesThreshold { get { throw null; } set { } } 92 public bool RtsEnable { get { throw null; } set { } } 93 public System.IO.Ports.StopBits StopBits { get { throw null; } set { } } 94 public int WriteBufferSize { get { throw null; } set { } } 95 public int WriteTimeout { get { throw null; } set { } } 96 public event System.IO.Ports.SerialDataReceivedEventHandler DataReceived { add { } remove { } } 97 public event System.IO.Ports.SerialErrorReceivedEventHandler ErrorReceived { add { } remove { } } 98 public event System.IO.Ports.SerialPinChangedEventHandler PinChanged { add { } remove { } } Close()99 public void Close() { } DiscardInBuffer()100 public void DiscardInBuffer() { } DiscardOutBuffer()101 public void DiscardOutBuffer() { } Dispose(bool disposing)102 protected override void Dispose(bool disposing) { } GetPortNames()103 public static string[] GetPortNames() { throw null; } Open()104 public void Open() { } Read(byte[] buffer, int offset, int count)105 public int Read(byte[] buffer, int offset, int count) { throw null; } Read(char[] buffer, int offset, int count)106 public int Read(char[] buffer, int offset, int count) { throw null; } ReadByte()107 public int ReadByte() { throw null; } ReadChar()108 public int ReadChar() { throw null; } ReadExisting()109 public string ReadExisting() { throw null; } ReadLine()110 public string ReadLine() { throw null; } ReadTo(string value)111 public string ReadTo(string value) { throw null; } Write(byte[] buffer, int offset, int count)112 public void Write(byte[] buffer, int offset, int count) { } Write(char[] buffer, int offset, int count)113 public void Write(char[] buffer, int offset, int count) { } Write(string text)114 public void Write(string text) { } WriteLine(string text)115 public void WriteLine(string text) { } 116 } 117 public enum StopBits 118 { 119 None = 0, 120 One = 1, 121 OnePointFive = 3, 122 Two = 2, 123 } 124 } 125