Skip to content

Commit b5e34a7

Browse files
Merge pull request #93 from nullinside-development-group/chore/sync
Chore/sync
2 parents 122bee4 + b14d28e commit b5e34a7

28 files changed

+320
-294
lines changed

src/Nullinside.Api.Common.AspNetCore/.editorconfig

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ end_of_line = lf
2525
insert_final_newline = false
2626

2727
#### .NET Coding Conventions ####
28-
[*.{cs,vb}]
2928

3029
# Organize usings
3130
dotnet_separate_import_directive_groups = true
@@ -78,7 +77,6 @@ dotnet_code_quality_unused_parameters = all:suggestion
7877
dotnet_remove_unnecessary_suppression_exclusions = none
7978

8079
#### C# Coding Conventions ####
81-
[*.cs]
8280

8381
# var preferences
8482
csharp_style_var_elsewhere = false:silent
@@ -175,7 +173,6 @@ csharp_preserve_single_line_blocks = true
175173
csharp_preserve_single_line_statements = true
176174

177175
#### Naming styles ####
178-
[*.{cs,vb}]
179176

180177
# Naming rules
181178

@@ -229,19 +226,19 @@ dotnet_naming_rule.private_static_fields_should_be_s_camelcase.style = s_camelca
229226

230227
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.severity = suggestion
231228
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.symbols = public_constant_fields
232-
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.style = pascalcase
229+
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.style = all_upper
233230

234231
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.severity = suggestion
235232
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.symbols = private_constant_fields
236-
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.style = pascalcase
233+
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.style = all_upper
237234

238235
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.severity = suggestion
239236
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.symbols = public_static_readonly_fields
240-
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = pascalcase
237+
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = all_upper
241238

242239
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.severity = suggestion
243240
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.symbols = private_static_readonly_fields
244-
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = pascalcase
241+
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = all_upper
245242

246243
dotnet_naming_rule.enums_should_be_pascalcase.severity = suggestion
247244
dotnet_naming_rule.enums_should_be_pascalcase.symbols = enums
@@ -365,3 +362,7 @@ dotnet_naming_style.s_camelcase.required_suffix =
365362
dotnet_naming_style.s_camelcase.word_separator =
366363
dotnet_naming_style.s_camelcase.capitalization = camel_case
367364

365+
dotnet_naming_style.all_upper.required_prefix =
366+
dotnet_naming_style.all_upper.required_suffix =
367+
dotnet_naming_style.all_upper.word_separator = _
368+
dotnet_naming_style.all_upper.capitalization = all_upper

src/Nullinside.Api.Common.AspNetCore/Middleware/BasicAuthenticationHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ protected override async Task<AuthenticateResult> HandleAuthenticateAsync() {
7575
try {
7676
//auth logic
7777
List<Claim> claims = [
78-
new Claim(ClaimTypes.Email, dbUser.Email ?? string.Empty),
79-
new Claim(ClaimTypes.UserData, dbUser.Id.ToString())
78+
new(ClaimTypes.Email, dbUser.Email ?? string.Empty),
79+
new(ClaimTypes.UserData, dbUser.Id.ToString())
8080
];
8181

8282
if (null != dbUser.Roles) {

src/Nullinside.Api.Common.AspNetCore/Nullinside.Api.Common.AspNetCore.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2222
<PrivateAssets>all</PrivateAssets>
2323
</PackageReference>
24-
<PackageReference Include="Nullinside.MySql.EntityFrameworkCore" Version="9.0.3" />
25-
<PackageReference Include="Swashbuckle.AspNetCore" Version="8.1.4" />
26-
<PackageReference Include="System.Text.Json" Version="9.0.6" />
24+
<PackageReference Include="Nullinside.MySql.EntityFrameworkCore" Version="9.0.3"/>
25+
<PackageReference Include="Swashbuckle.AspNetCore" Version="8.1.4"/>
26+
<PackageReference Include="System.Text.Json" Version="9.0.6"/>
2727
</ItemGroup>
2828

2929
<ItemGroup>

src/Nullinside.Api.Common/.editorconfig

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ end_of_line = lf
2525
insert_final_newline = false
2626

2727
#### .NET Coding Conventions ####
28-
[*.{cs,vb}]
2928

3029
# Organize usings
3130
dotnet_separate_import_directive_groups = true
@@ -78,7 +77,6 @@ dotnet_code_quality_unused_parameters = all:suggestion
7877
dotnet_remove_unnecessary_suppression_exclusions = none
7978

8079
#### C# Coding Conventions ####
81-
[*.cs]
8280

8381
# var preferences
8482
csharp_style_var_elsewhere = false:silent
@@ -175,7 +173,6 @@ csharp_preserve_single_line_blocks = true
175173
csharp_preserve_single_line_statements = true
176174

177175
#### Naming styles ####
178-
[*.{cs,vb}]
179176

180177
# Naming rules
181178

@@ -229,19 +226,19 @@ dotnet_naming_rule.private_static_fields_should_be_s_camelcase.style = s_camelca
229226

230227
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.severity = suggestion
231228
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.symbols = public_constant_fields
232-
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.style = pascalcase
229+
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.style = all_upper
233230

234231
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.severity = suggestion
235232
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.symbols = private_constant_fields
236-
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.style = pascalcase
233+
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.style = all_upper
237234

238235
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.severity = suggestion
239236
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.symbols = public_static_readonly_fields
240-
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = pascalcase
237+
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = all_upper
241238

242239
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.severity = suggestion
243240
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.symbols = private_static_readonly_fields
244-
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = pascalcase
241+
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = all_upper
245242

246243
dotnet_naming_rule.enums_should_be_pascalcase.severity = suggestion
247244
dotnet_naming_rule.enums_should_be_pascalcase.symbols = enums
@@ -365,3 +362,7 @@ dotnet_naming_style.s_camelcase.required_suffix =
365362
dotnet_naming_style.s_camelcase.word_separator =
366363
dotnet_naming_style.s_camelcase.capitalization = camel_case
367364

365+
dotnet_naming_style.all_upper.required_prefix =
366+
dotnet_naming_style.all_upper.required_suffix =
367+
dotnet_naming_style.all_upper.word_separator = _
368+
dotnet_naming_style.all_upper.capitalization = all_upper

src/Nullinside.Api.Common/Desktop/GithubLatestReleaseJson.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
using System.Diagnostics.CodeAnalysis;
1+
// ReSharper disable All
2+
3+
using System.Diagnostics.CodeAnalysis;
24

35
namespace Nullinside.Api.Common.Desktop;
46

src/Nullinside.Api.Common/Nullinside.Api.Common.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
</PropertyGroup>
1818

1919
<ItemGroup>
20-
<PackageReference Include="log4net" Version="3.1.0" />
21-
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.6" />
20+
<PackageReference Include="log4net" Version="3.1.0"/>
21+
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.6"/>
2222
<PackageReference Include="Newtonsoft.Json" Version="13.0.3"/>
2323
<PackageReference Include="SSH.NET" Version="2025.0.0"/>
2424
<PackageReference Include="TwitchLib.Api" Version="3.9.0"/>

src/Nullinside.Api.Common/Twitch/Json/TwitchModeratedChannelsResponse.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
using System.Diagnostics.CodeAnalysis;
1+
// ReSharper disable All
2+
3+
using System.Diagnostics.CodeAnalysis;
24

35
namespace Nullinside.Api.Common.Twitch.Json;
46

src/Nullinside.Api.Common/Twitch/Support/TwitchBotLoginErrors.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ public enum TwitchBotLoginErrors {
77
/// <summary>
88
/// An error with the token that twitch provided us.
99
/// </summary>
10-
TwitchErrorWithToken,
10+
TWITCH_ERROR_WITH_TOKEN,
1111

1212
/// <summary>
1313
/// The twitch account doesn't have an email address associated with it.
1414
/// </summary>
15-
TwitchAccountHasNoEmail,
15+
TWITCH_ACCOUNT_HAS_NO_EMAIL,
1616

1717
/// <summary>
1818
/// An internal error in the web server having nothing to do with the outside world.
1919
/// </summary>
20-
InternalError
20+
INTERNAL_ERROR
2121
}

src/Nullinside.Api.Common/Twitch/TwitchApiProxy.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class TwitchApiProxy : ITwitchApiProxy {
2727
/// <summary>
2828
/// The logger.
2929
/// </summary>
30-
private static readonly ILog Log = LogManager.GetLogger(typeof(TwitchApiProxy));
30+
private static readonly ILog LOG = LogManager.GetLogger(typeof(TwitchApiProxy));
3131

3232
/// <summary>
3333
/// Initializes a new instance of the <see cref="TwitchApiProxy" /> class.
@@ -213,14 +213,14 @@ public virtual async Task<IEnumerable<BannedUser>> BanChannelUsers(string channe
213213
}
214214

215215
bannedUsers.AddRange(response.Data);
216-
Log.Info($"Banned {user.Username} ({user.Id}) in {channelId}: {reason}");
216+
LOG.Info($"Banned {user.Username} ({user.Id}) in {channelId}: {reason}");
217217
}
218218
catch (HttpResponseException ex) {
219219
string exceptionReason = await ex.HttpResponse.Content.ReadAsStringAsync(token);
220-
Log.Debug($"Failed to ban {user.Username} ({user.Id}) in {channelId}: {exceptionReason}", ex);
220+
LOG.Debug($"Failed to ban {user.Username} ({user.Id}) in {channelId}: {exceptionReason}", ex);
221221
}
222222
catch (Exception ex) {
223-
Log.Debug($"Failed to ban {user.Username} ({user.Id}) in {channelId}", ex);
223+
LOG.Debug($"Failed to ban {user.Username} ({user.Id}) in {channelId}", ex);
224224
}
225225
}
226226

0 commit comments

Comments
 (0)