We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aacd11b commit ab3c6ccCopy full SHA for ab3c6cc
Source/Orts.Common/GetStringAttribute.cs
@@ -52,13 +52,11 @@ public class GetParticularStringAttribute : GetStringAttribute
52
public static string GetParticularPrettyName(string context, Enum value)
53
{
54
var type = value.GetType();
55
- string toBeReturned = type.GetField(Enum.GetName(type, value))
+ return type.GetField(Enum.GetName(type, value))
56
.GetCustomAttributes(false)
57
.OfType<GetParticularStringAttribute>()
58
- .SingleOrDefault()
+ .FirstOrDefault(attribute => attribute.Context == context)
59
.Name;
60
-
61
- return toBeReturned;
62
}
63
64
0 commit comments