Skip to content

Commit

Permalink
implement sonar suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
drewburlingame committed Jul 6, 2022
1 parent 063504b commit 6ecc359
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions CommandDotNet.TestTools/ResourcesDef.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,16 @@ public IEnumerable<string> IsMissingMembersFrom(ResourcesDef source)
{
var proxyCode = new StringBuilder();

foreach (var property in Properties)
foreach (var property in Properties.Select(p => p.Name))
{
var localize = "_localize(_memberNameAsKey " + NewLine +
$" ? \"{property.Name}\"" + NewLine +
$" : base.{property.Name})";
$" ? \"{property}\"" + NewLine +
$" : base.{property})";

proxyCode.AppendLine(NewLine +
$" public override string {property.Name} =>{NewLine}" +
$" public override string {property} =>{NewLine}" +
$" {localize}{NewLine}" +
$" ?? base.{property.Name};");
$" ?? base.{property};");
}

foreach (var method in Methods)
Expand Down

0 comments on commit 6ecc359

Please sign in to comment.