Skip to content

Commit 6c07370

Browse files
usings
1 parent 84fcc48 commit 6c07370

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

GithubWebpagesWebhook/CascadingStyleSheetHelper.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
1+
using System.Collections.Generic;
62

73
namespace GithubWebpagesWebhook
84
{
95
public static class CascadingStyleSheetHelper
106
{
11-
static readonly Dictionary<string, string> SupportedLanguages = new Dictionary<string, string>()
7+
private static readonly Dictionary<string, string> SupportedLanguages = new Dictionary<string, string>()
128
{
139
{ "C#", "language-csharp" },
1410
{ "JavaScript", "language-js" },
@@ -48,9 +44,9 @@ public static class CascadingStyleSheetHelper
4844

4945
public static bool TryGetLanguageCss(string key, out string value)
5046
{
51-
if (SupportedLanguages.ContainsKey(key))
47+
if (SupportedLanguages.TryGetValue(key, out var language))
5248
{
53-
value = SupportedLanguages[key];
49+
value = language;
5450
return true;
5551
}
5652

0 commit comments

Comments
 (0)