Skip to content

Commit 0c6d3dd

Browse files
committed
Use nameof() instead of hardcoding the string
1 parent e4f921a commit 0c6d3dd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Flow.Launcher.Localization.SourceGenerators/Localize/LocalizeSourceGenerator.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,11 @@ private void GenerateClass(
304304
Dictionary<string, LocalizableString> localizedStrings,
305305
string[] unusedLocalizationKeys,
306306
string propertyName = null
307-
)
308-
{
307+
) {
308+
const string name = nameof(LocalizeSourceGenerator);
309309
var version = typeof(LocalizeSourceGenerator).Assembly.GetName().Version;
310310
sb.AppendLine();
311-
sb.AppendLine($"[System.CodeDom.Compiler.GeneratedCode(\"LocalizeSourceGenerator\", \"{version}\")]");
311+
sb.AppendLine($"[System.CodeDom.Compiler.GeneratedCode(\"{name}\", \"{version}\")]");
312312
sb.AppendLine($"public static class {ClassName}");
313313
sb.AppendLine("{");
314314
foreach (var localizedString in localizedStrings)

0 commit comments

Comments
 (0)