summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-09 13:10:54 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-09 13:10:54 -0400
commitad4d065fe748b4f3f32a8bf03e9a96132e1a0c79 (patch)
tree009982ba169c78398062b9b4cd40a753ef00e629
parentccf760452d64e1965c92c5cf8af399a5e80d5a3a (diff)
downloadSMAPI-ad4d065fe748b4f3f32a8bf03e9a96132e1a0c79.tar.gz
SMAPI-ad4d065fe748b4f3f32a8bf03e9a96132e1a0c79.tar.bz2
SMAPI-ad4d065fe748b4f3f32a8bf03e9a96132e1a0c79.zip
simplify code with generic Enum.GetValues
-rw-r--r--src/SMAPI.Web/Views/LogParser/Index.cshtml9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml
index ff8aa003..cf7e0a5c 100644
--- a/src/SMAPI.Web/Views/LogParser/Index.cshtml
+++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml
@@ -16,18 +16,15 @@
IDictionary<string, LogModInfo[]> contentPacks = Model.GetContentPacksByMod();
IDictionary<string, bool> defaultFilters = Enum
- .GetValues(typeof(LogLevel))
- .Cast<LogLevel>()
+ .GetValues<LogLevel>()
.ToDictionary(level => level.ToString().ToLower(), level => level != LogLevel.Trace);
IDictionary<int, string> logLevels = Enum
- .GetValues(typeof(LogLevel))
- .Cast<LogLevel>()
+ .GetValues<LogLevel>()
.ToDictionary(level => (int)level, level => level.ToString().ToLower());
IDictionary<int, string> logSections = Enum
- .GetValues(typeof(LogSection))
- .Cast<LogSection>()
+ .GetValues<LogSection>()
.ToDictionary(section => (int)section, section => section.ToString());
string curPageUrl = this.Url.PlainAction("Index", "LogParser", new { id = Model.PasteID }, absoluteUrl: true);