public SerialPortWrapper(string portName, BaudRate baudRate = BaudRate.BaudRate9600, Parity parity = Parity.None, Databits dataBits = Databits.EightBits, StopBits stopBits = StopBits.One) : this() { PortName = portName; BaudRate = baudRate; Parity = parity; DataBits = dataBits; StopBits = stopBits; }
/// <summary> /// Returns a hash code for this instance. /// </summary> /// <returns> /// A hash code for this instance, suitable for use in hashing algorithms and data structures /// like a hash table. /// </returns> public override int GetHashCode() { int hash = 13; hash = (hash * 7) + Baudrate.GetHashCode(); hash = (hash * 7) + Databits.GetHashCode(); hash = (hash * 7) + Stopbits.GetHashCode(); hash = (hash * 7) + Parity.GetHashCode(); hash = (hash * 7) + Handshake.GetHashCode(); hash = (hash * 7) + TxTimeoutMSec.GetHashCode(); hash = (hash * 7) + RxTimeoutMSec.GetHashCode(); return(hash); }