Skip to content

Commit

Permalink
Convert object reference into static usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Lamparter committed Jan 19, 2025
1 parent 58ec8ba commit 7a0b55e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Riverside.JsonBinder.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ private static void ConvertJsonToClasses(string json, string[] languages)
return;
}

var syntaxHighlighter = new SyntaxHighlighter();
foreach (string choice in languages)
{
if (Enum.TryParse<SerializableLanguage>(choice.Trim(), true, out var selectedLanguage))
Expand All @@ -62,7 +61,7 @@ private static void ConvertJsonToClasses(string json, string[] languages)
{
string result = JsonSerializer.ConvertTo(json, selectedLanguage);
System.Console.WriteLine($"\n{selectedLanguage} Classes:\n");
syntaxHighlighter.DisplayCodeWithColors(result, selectedLanguage);
SyntaxHighlighter.DisplayCodeWithColors(result, selectedLanguage);
}
catch (JsonException ex)
{
Expand Down

0 comments on commit 7a0b55e

Please sign in to comment.