コード例 #1
0
 /// <summary>
 /// Преобразовать наименование истории в тип
 /// </summary>
 public static HistoryType HistoryFromString(string historyType) =>
 HistoryTypesString.FirstOrDefault(history => history.Value == historyType).Key;
コード例 #2
0
 /// <summary>
 /// Преобразовать тип истории в наименование
 /// </summary>
 public static string HistoryToString(HistoryType historyType)
 {
     HistoryTypesString.TryGetValue(historyType, out string historyString);
     return(historyString);
 }