Skip to content

Commit

Permalink
Small cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
MichielOda committed Nov 21, 2024
1 parent 3bd4409 commit b102e46
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Parsers.Common/VisualStudio/Projects/DataMinerProjectType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public enum DataMinerProjectType
/// </summary>
public static class DataMinerProjectTypeConverter
{
private static Dictionary<string, DataMinerProjectType> stringToEnum = new Dictionary<string, DataMinerProjectType>()
private static readonly Dictionary<string, DataMinerProjectType> StringToEnum = new Dictionary<string, DataMinerProjectType>
{
["Package"] = DataMinerProjectType.Package,
["AutomationScript"] = DataMinerProjectType.AutomationScript,
Expand All @@ -47,7 +47,7 @@ public static class DataMinerProjectTypeConverter
["UserDefinedApi"] = DataMinerProjectType.UserDefinedApi,
};

private static Dictionary<DataMinerProjectType, string> enumToString = new Dictionary<DataMinerProjectType, string>()
private static readonly Dictionary<DataMinerProjectType, string> EnumToString = new Dictionary<DataMinerProjectType, string>
{
[DataMinerProjectType.Package] = "Package",
[DataMinerProjectType.AutomationScript] = "AutomationScript",
Expand All @@ -63,7 +63,7 @@ public static class DataMinerProjectTypeConverter
/// <returns>Converted value when successful, null when not.</returns>
public static DataMinerProjectType? ToEnum(string value)
{
if (stringToEnum.TryGetValue(value, out DataMinerProjectType t))
if (StringToEnum.TryGetValue(value, out DataMinerProjectType t))
{
return t;
}
Expand All @@ -78,7 +78,7 @@ public static class DataMinerProjectTypeConverter
/// <returns>Converted value when successful, null when not.</returns>
public static string ToString(DataMinerProjectType value)
{
if (enumToString.TryGetValue(value, out string s))
if (EnumToString.TryGetValue(value, out string s))
{
return s;
}
Expand Down

0 comments on commit b102e46

Please sign in to comment.