Updated editorconfig to (mostly?) require braces around if/else statements, and applied the new formatting rules

This commit is contained in:
Kwoth
2022-02-02 01:44:45 +01:00
parent b22cd5a81e
commit ffa2c3f119
202 changed files with 2108 additions and 920 deletions

View File

@@ -14,7 +14,10 @@ public abstract record SmartText
public static SmartText operator +(SmartText text, string input)
=> text switch
{
SmartEmbedText set => set with { PlainText = set.PlainText + input },
SmartEmbedText set => set with
{
PlainText = set.PlainText + input
},
SmartPlainText spt => new SmartPlainText(spt.Text + input),
_ => throw new ArgumentOutOfRangeException(nameof(text))
};
@@ -22,7 +25,10 @@ public abstract record SmartText
public static SmartText operator +(string input, SmartText text)
=> text switch
{
SmartEmbedText set => set with { PlainText = input + set.PlainText },
SmartEmbedText set => set with
{
PlainText = input + set.PlainText
},
SmartPlainText spt => new SmartPlainText(input + spt.Text),
_ => throw new ArgumentOutOfRangeException(nameof(text))
};
@@ -41,7 +47,7 @@ public abstract record SmartText
smartEmbedText.NormalizeFields();
if (!smartEmbedText.IsValid)
if (!smartEmbedText.IsValid)
return new SmartPlainText(input);
return smartEmbedText;