More common refactorings like renaming variables, removing empty statements and unused variables, etc

This commit is contained in:
Kwoth
2022-01-09 16:46:08 +01:00
parent 2ce3262d59
commit f07a855912
75 changed files with 447 additions and 465 deletions

View File

@@ -107,7 +107,7 @@ public partial class Utility
if (string.IsNullOrWhiteSpace(value))
value = "-";
if (prop != "currency.sign") value = Format.Code(Format.Sanitize(value?.TrimTo(1000)), "json");
if (prop != "currency.sign") value = Format.Code(Format.Sanitize(value.TrimTo(1000)), "json");
var embed = _eb.Create()
.WithOkColor()
@@ -134,7 +134,7 @@ public partial class Utility
await ctx.OkAsync();
}
private string GetPropsAndValuesString(IConfigService config, IEnumerable<string> names)
private string GetPropsAndValuesString(IConfigService config, IReadOnlyCollection<string> names)
{
var propValues = names.Select(pr =>
{
@@ -142,7 +142,7 @@ public partial class Utility
if (pr != "currency.sign")
val = val?.TrimTo(28);
return val?.Replace("\n", "") ?? "-";
});
}).ToList();
var strings = names.Zip(propValues, (name, value) => $"{name,-25} = {value}\n");