コード例 #1
0
        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;
                }
            }));
        }
コード例 #2
0
 public StringParser(NaturalComparer comparer)
 {
     _comparer = comparer;
 }