private Task <string[]> AddComPortComboBoxItemsAsync() { return(Task.Run(() => { ReadConfigBaudRates(); try { var comparer = new NaturalComparer(); return SerialPort.GetPortNames().OrderBy(x => x, comparer).ToArray(); } catch (Exception ex) { //_log.Error(ex, "AddComPortComboBoxItems: Failed - {0}", ex.Message); throw; } })); }
public StringParser(NaturalComparer comparer) { _comparer = comparer; }