public static SerialPortAddress[] GetSerialPorts() { string[] portNames = SerialPort.GetPortNames(); SerialPortAddress[] ports = new SerialPortAddress[portNames.Length]; for (int i = 0; i < portNames.Length; i++) { ports[i] = new SerialPortAddress(portNames[i]); } Task.Factory.StartNew(() => UpdateSerialPortsWithDescriptions(ports)); return(ports); }
public ArmConnector(SerialPortAddress portAddress) : this(portAddress.Name) { }