Skip to content

Commit 02120b5

Browse files
committed
Refactor properties to use expression-bodied members.
Simplified the implementation of the `Before` and `After` properties by converting them to use expression-bodied members. This improves readability and reduces code complexity.
1 parent f68b7ad commit 02120b5

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

source/AmericanToBritish/DLL/PluginForm.cs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,9 @@ private class Conversion
1919
public string ConvertedText { get; set; }
2020
public string EditedText { get; set; }
2121

22-
public string Before
23-
{
24-
get
25-
{
26-
return Paragraph.Text.Trim().Replace(Environment.NewLine, Configuration.ListViewLineSeparatorString);
27-
}
28-
}
22+
public string Before => Paragraph.Text.Trim().Replace(Environment.NewLine, Configuration.ListViewLineSeparatorString);
2923

30-
public string After
31-
{
32-
get
33-
{
34-
return (EditedText ?? ConvertedText).Trim().Replace(Environment.NewLine, Configuration.ListViewLineSeparatorString);
35-
}
36-
}
24+
public string After => (EditedText ?? ConvertedText).Trim().Replace(Environment.NewLine, Configuration.ListViewLineSeparatorString);
3725
}
3826

3927
internal string FixedSubtitle { get; private set; }

0 commit comments

Comments
 (0)