Skip to content

Commit f0fb3ec

Browse files
committed
chore: code clean
1 parent 6763a41 commit f0fb3ec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+502
-185
lines changed

src/BSH.Controls/Preview/Files/CLikeFormat.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,21 @@ public abstract class CLikeFormat : CodeFormat
3434
/// </summary>
3535
protected override string CommentRegEx
3636
{
37-
get { return @"/\*.*?\*/|//.*?(?=\r|\n)"; }
37+
get
38+
{
39+
return @"/\*.*?\*/|//.*?(?=\r|\n)";
40+
}
3841
}
3942

4043
/// <summary>
4144
/// Regular expression string to match string and character literals.
4245
/// </summary>
4346
protected override string StringRegEx
4447
{
45-
get { return @"@?""""|@?"".*?(?!\\).""|''|'.*?(?!\\).'"; }
48+
get
49+
{
50+
return @"@?""""|@?"".*?(?!\\).""|''|'.*?(?!\\).'";
51+
}
4652
}
4753
}
4854
}

src/BSH.Controls/Preview/Files/CodeFormat.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ protected abstract string Keywords
5353
/// </remarks>
5454
protected virtual string Preprocessors
5555
{
56-
get { return ""; }
56+
get
57+
{
58+
return "";
59+
}
5760
}
5861

5962
/// <summary>
@@ -85,7 +88,10 @@ protected abstract string CommentRegEx
8588
/// </remarks>
8689
public virtual bool CaseSensitive
8790
{
88-
get { return true; }
91+
get
92+
{
93+
return true;
94+
}
8995
}
9096

9197
/// <summary/>

src/BSH.Controls/Preview/Files/MshFormat.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,21 @@ public class MshFormat : CodeFormat
1010
/// </summary>
1111
protected override string CommentRegEx
1212
{
13-
get { return @"#.*?(?=\r|\n)"; }
13+
get
14+
{
15+
return @"#.*?(?=\r|\n)";
16+
}
1417
}
1518

1619
/// <summary>
1720
/// Regular expression string to match string and character literals.
1821
/// </summary>
1922
protected override string StringRegEx
2023
{
21-
get { return @"@?""""|@?"".*?(?!\\).""|''|'.*?(?!\\).'"; }
24+
get
25+
{
26+
return @"@?""""|@?"".*?(?!\\).""|''|'.*?(?!\\).'";
27+
}
2228
}
2329

2430
/// <summary>

src/BSH.Controls/Preview/Files/SourceFormat.cs

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,28 +62,40 @@ protected SourceFormat()
6262
/// <value>The number of space characters to substitute for tab
6363
/// characters. The default is <b>4</b>, unless overridden is a
6464
/// derived class.</value>
65-
public byte TabSpaces { get; set; }
65+
public byte TabSpaces
66+
{
67+
get; set;
68+
}
6669

6770
/// <summary>
6871
/// Enables or disables line numbers in output.
6972
/// </summary>
7073
/// <value>When <b>true</b>, line numbers are generated.
7174
/// The default is <b>false</b>.</value>
72-
public bool LineNumbers { get; set; }
75+
public bool LineNumbers
76+
{
77+
get; set;
78+
}
7379

7480
/// <summary>
7581
/// Enables or disables alternating line background.
7682
/// </summary>
7783
/// <value>When <b>true</b>, lines background is alternated.
7884
/// The default is <b>false</b>.</value>
79-
public bool Alternate { get; set; }
85+
public bool Alternate
86+
{
87+
get; set;
88+
}
8089

8190
/// <summary>
8291
/// Enables or disables the embedded CSS style sheet.
8392
/// </summary>
8493
/// <value>When <b>true</b>, the CSS &lt;style&gt; element is included
8594
/// in the HTML output. The default is <b>false</b>.</value>
86-
public bool EmbedStyleSheet { get; set; }
95+
public bool EmbedStyleSheet
96+
{
97+
get; set;
98+
}
8799

88100
/// <overloads>Transform source code to HTML 4.01.</overloads>
89101
///
@@ -141,7 +153,10 @@ public static string GetCssString()
141153
/// <summary>
142154
/// The regular expression used to capture language tokens.
143155
/// </summary>
144-
protected Regex CodeRegex { get; set; }
156+
protected Regex CodeRegex
157+
{
158+
get; set;
159+
}
145160

146161
/// <summary>
147162
/// Called to evaluate the HTML fragment corresponding to each

src/BSH.Controls/Preview/Files/TsqlFormat.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ protected override string StringRegEx
5858
/// </summary>
5959
public override bool CaseSensitive
6060
{
61-
get { return false; }
61+
get
62+
{
63+
return false;
64+
}
6265
}
6366

6467

src/BSH.Controls/Preview/Files/VisualBasicFormat.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,32 @@ public class VisualBasicFormat : CodeFormat
3434
/// <value>Always <b>true</b>, since VB is not case sensitive.</value>
3535
public override bool CaseSensitive
3636
{
37-
get { return false; }
37+
get
38+
{
39+
return false;
40+
}
3841
}
3942

4043
/// <summary>
4144
/// Regular expression string to match comments (' and REM).
4245
/// </summary>
4346
protected override string CommentRegEx
4447
{
45-
get { return @"(?:'|REM\s).*?(?=\r|\n)"; }
48+
get
49+
{
50+
return @"(?:'|REM\s).*?(?=\r|\n)";
51+
}
4652
}
4753

4854
/// <summary>
4955
/// Regular expression string to match string and character literals.
5056
/// </summary>
5157
protected override string StringRegEx
5258
{
53-
get { return @"""""|"".*?"""; }
59+
get
60+
{
61+
return @"""""|"".*?""";
62+
}
5463
}
5564

5665
/// <summary>

src/BSH.Controls/Preview/Psd/ColorModeData.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@ namespace SimplePsd
55
/// </summary>
66
public class ColorModeData
77
{
8-
public int NLength { get; set; }
8+
public int NLength
9+
{
10+
get; set;
11+
}
912

10-
public byte[] ColourData { get; set; }
13+
public byte[] ColourData
14+
{
15+
get; set;
16+
}
1117

1218
public ColorModeData()
1319
{

src/BSH.Controls/Preview/Psd/DisplayInfo.cs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,27 @@ namespace SimplePsd
55
/// </summary>
66
public class DisplayInfo
77
{
8-
public short ColourSpace { get; set; }
8+
public short ColourSpace
9+
{
10+
get; set;
11+
}
912

1013
public short[] Colour { get; set; } = new short[4];
1114

12-
public short Opacity { get; set; }
15+
public short Opacity
16+
{
17+
get; set;
18+
}
1319

14-
public bool Kind { get; set; }
20+
public bool Kind
21+
{
22+
get; set;
23+
}
1524

16-
public byte Padding { get; set; }
25+
public byte Padding
26+
{
27+
get; set;
28+
}
1729

1830
public DisplayInfo()
1931
{

src/BSH.Controls/Preview/Psd/HeaderInfo.cs

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,30 @@ namespace SimplePsd
55
/// </summary>
66
public class HeaderInfo
77
{
8-
public short NChannels { get; set; }
8+
public short NChannels
9+
{
10+
get; set;
11+
}
912

10-
public int NHeight { get; set; }
13+
public int NHeight
14+
{
15+
get; set;
16+
}
1117

12-
public int NWidth { get; set; }
18+
public int NWidth
19+
{
20+
get; set;
21+
}
1322

14-
public short NBitsPerPixel { get; set; }
23+
public short NBitsPerPixel
24+
{
25+
get; set;
26+
}
1527

16-
public short NColourMode { get; set; }
28+
public short NColourMode
29+
{
30+
get; set;
31+
}
1732

1833
public HeaderInfo()
1934
{

src/BSH.Controls/Preview/Psd/ImageResource.cs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,27 @@ namespace SimplePsd
55
/// </summary>
66
public class ImageResource
77
{
8-
public int NLength { get; set; }
8+
public int NLength
9+
{
10+
get; set;
11+
}
912

1013
public byte[] OSType { get; set; } = new byte[4];
1114

12-
public short NID { get; set; }
15+
public short NID
16+
{
17+
get; set;
18+
}
1319

14-
public byte[] Name { get; set; }
20+
public byte[] Name
21+
{
22+
get; set;
23+
}
1524

16-
public int NSize { get; set; }
25+
public int NSize
26+
{
27+
get; set;
28+
}
1729

1830
public void Reset()
1931
{

0 commit comments

Comments
 (0)