Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions src/Nullinside.Api.Common.AspNetCore/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ end_of_line = lf
insert_final_newline = false

#### .NET Coding Conventions ####
[*.{cs,vb}]

# Organize usings
dotnet_separate_import_directive_groups = true
Expand Down Expand Up @@ -78,7 +77,6 @@ dotnet_code_quality_unused_parameters = all:suggestion
dotnet_remove_unnecessary_suppression_exclusions = none

#### C# Coding Conventions ####
[*.cs]

# var preferences
csharp_style_var_elsewhere = false:silent
Expand Down Expand Up @@ -175,7 +173,6 @@ csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true

#### Naming styles ####
[*.{cs,vb}]

# Naming rules

Expand Down Expand Up @@ -229,19 +226,19 @@ dotnet_naming_rule.private_static_fields_should_be_s_camelcase.style = s_camelca

dotnet_naming_rule.public_constant_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.symbols = public_constant_fields
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.style = all_upper

dotnet_naming_rule.private_constant_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.symbols = private_constant_fields
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.style = all_upper

dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.symbols = public_static_readonly_fields
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = all_upper

dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.symbols = private_static_readonly_fields
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = all_upper

dotnet_naming_rule.enums_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.enums_should_be_pascalcase.symbols = enums
Expand Down Expand Up @@ -365,3 +362,7 @@ dotnet_naming_style.s_camelcase.required_suffix =
dotnet_naming_style.s_camelcase.word_separator =
dotnet_naming_style.s_camelcase.capitalization = camel_case

dotnet_naming_style.all_upper.required_prefix =
dotnet_naming_style.all_upper.required_suffix =
dotnet_naming_style.all_upper.word_separator = _
dotnet_naming_style.all_upper.capitalization = all_upper
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ protected override async Task<AuthenticateResult> HandleAuthenticateAsync() {
try {
//auth logic
List<Claim> claims = [
new Claim(ClaimTypes.Email, dbUser.Email ?? string.Empty),
new Claim(ClaimTypes.UserData, dbUser.Id.ToString())
new(ClaimTypes.Email, dbUser.Email ?? string.Empty),
new(ClaimTypes.UserData, dbUser.Id.ToString())
];

if (null != dbUser.Roles) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Nullinside.MySql.EntityFrameworkCore" Version="9.0.3" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="8.1.4" />
<PackageReference Include="System.Text.Json" Version="9.0.6" />
<PackageReference Include="Nullinside.MySql.EntityFrameworkCore" Version="9.0.3"/>
<PackageReference Include="Swashbuckle.AspNetCore" Version="8.1.4"/>
<PackageReference Include="System.Text.Json" Version="9.0.6"/>
</ItemGroup>

<ItemGroup>
Expand Down
15 changes: 8 additions & 7 deletions src/Nullinside.Api.Common/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ end_of_line = lf
insert_final_newline = false

#### .NET Coding Conventions ####
[*.{cs,vb}]

# Organize usings
dotnet_separate_import_directive_groups = true
Expand Down Expand Up @@ -78,7 +77,6 @@ dotnet_code_quality_unused_parameters = all:suggestion
dotnet_remove_unnecessary_suppression_exclusions = none

#### C# Coding Conventions ####
[*.cs]

# var preferences
csharp_style_var_elsewhere = false:silent
Expand Down Expand Up @@ -175,7 +173,6 @@ csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true

#### Naming styles ####
[*.{cs,vb}]

# Naming rules

Expand Down Expand Up @@ -229,19 +226,19 @@ dotnet_naming_rule.private_static_fields_should_be_s_camelcase.style = s_camelca

dotnet_naming_rule.public_constant_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.symbols = public_constant_fields
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.style = all_upper

dotnet_naming_rule.private_constant_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.symbols = private_constant_fields
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.style = all_upper

dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.symbols = public_static_readonly_fields
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = all_upper

dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.symbols = private_static_readonly_fields
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = all_upper

dotnet_naming_rule.enums_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.enums_should_be_pascalcase.symbols = enums
Expand Down Expand Up @@ -365,3 +362,7 @@ dotnet_naming_style.s_camelcase.required_suffix =
dotnet_naming_style.s_camelcase.word_separator =
dotnet_naming_style.s_camelcase.capitalization = camel_case

dotnet_naming_style.all_upper.required_prefix =
dotnet_naming_style.all_upper.required_suffix =
dotnet_naming_style.all_upper.word_separator = _
dotnet_naming_style.all_upper.capitalization = all_upper
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Diagnostics.CodeAnalysis;
// ReSharper disable All

using System.Diagnostics.CodeAnalysis;

namespace Nullinside.Api.Common.Desktop;

Expand Down
4 changes: 2 additions & 2 deletions src/Nullinside.Api.Common/Nullinside.Api.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="log4net" Version="3.1.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.6" />
<PackageReference Include="log4net" Version="3.1.0"/>
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.6"/>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3"/>
<PackageReference Include="SSH.NET" Version="2025.0.0"/>
<PackageReference Include="TwitchLib.Api" Version="3.9.0"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Diagnostics.CodeAnalysis;
// ReSharper disable All

using System.Diagnostics.CodeAnalysis;

namespace Nullinside.Api.Common.Twitch.Json;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ public enum TwitchBotLoginErrors {
/// <summary>
/// An error with the token that twitch provided us.
/// </summary>
TwitchErrorWithToken,
TWITCH_ERROR_WITH_TOKEN,

/// <summary>
/// The twitch account doesn't have an email address associated with it.
/// </summary>
TwitchAccountHasNoEmail,
TWITCH_ACCOUNT_HAS_NO_EMAIL,

/// <summary>
/// An internal error in the web server having nothing to do with the outside world.
/// </summary>
InternalError
INTERNAL_ERROR
}
8 changes: 4 additions & 4 deletions src/Nullinside.Api.Common/Twitch/TwitchApiProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class TwitchApiProxy : ITwitchApiProxy {
/// <summary>
/// The logger.
/// </summary>
private static readonly ILog Log = LogManager.GetLogger(typeof(TwitchApiProxy));
private static readonly ILog LOG = LogManager.GetLogger(typeof(TwitchApiProxy));

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

bannedUsers.AddRange(response.Data);
Log.Info($"Banned {user.Username} ({user.Id}) in {channelId}: {reason}");
LOG.Info($"Banned {user.Username} ({user.Id}) in {channelId}: {reason}");
}
catch (HttpResponseException ex) {
string exceptionReason = await ex.HttpResponse.Content.ReadAsStringAsync(token);
Log.Debug($"Failed to ban {user.Username} ({user.Id}) in {channelId}: {exceptionReason}", ex);
LOG.Debug($"Failed to ban {user.Username} ({user.Id}) in {channelId}: {exceptionReason}", ex);
}
catch (Exception ex) {
Log.Debug($"Failed to ban {user.Username} ({user.Id}) in {channelId}", ex);
LOG.Debug($"Failed to ban {user.Username} ({user.Id}) in {channelId}", ex);
}
}

Expand Down
Loading