Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
Aragas committed Nov 11, 2023
1 parent d2c23ba commit e3c855f
Show file tree
Hide file tree
Showing 279 changed files with 422 additions and 413 deletions.
2 changes: 1 addition & 1 deletion src/BUTR.Site.NexusMods.Client/Extensions/EnumExtension.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Blazorise;
using Blazorise;

using BUTR.Site.NexusMods.ServerClient;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;

namespace BUTR.Site.NexusMods.Client.Extensions;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components;

using System;
using System.Collections.Specialized;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
Expand Down
4 changes: 2 additions & 2 deletions src/BUTR.Site.NexusMods.Client/Models/DemoUser.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BUTR.CrashReport.Bannerlord.Parser;
using BUTR.CrashReport.Bannerlord.Parser;
using BUTR.Site.NexusMods.ServerClient;
using BUTR.Site.NexusMods.Shared.Helpers;

Expand Down Expand Up @@ -32,7 +32,7 @@ public static async IAsyncEnumerable<CrashReportModel2> GetCrashReports(IHttpCli
{
static string GetException(ExceptionModel? exception, bool inner = false) => exception is null ? string.Empty : $"""
{(inner ? "Inner ": string.Empty)}Exception information
{(inner ? "Inner " : string.Empty)}Exception information
Type: {exception.Type}
Message: {exception.Message}
CallStack:
Expand Down
2 changes: 1 addition & 1 deletion src/BUTR.Site.NexusMods.Client/Models/DiscordUserInfo2.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BUTR.Site.NexusMods.ServerClient;
using BUTR.Site.NexusMods.ServerClient;

namespace BUTR.Site.NexusMods.Client.Models;

Expand Down
2 changes: 1 addition & 1 deletion src/BUTR.Site.NexusMods.Client/Models/GOGUserInfo2.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BUTR.Site.NexusMods.ServerClient;
using BUTR.Site.NexusMods.ServerClient;

namespace BUTR.Site.NexusMods.Client.Models
{
Expand Down
2 changes: 1 addition & 1 deletion src/BUTR.Site.NexusMods.Client/Models/SteamUserInfo2.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BUTR.Site.NexusMods.ServerClient;
using BUTR.Site.NexusMods.ServerClient;

namespace BUTR.Site.NexusMods.Client.Models
{
Expand Down
2 changes: 1 addition & 1 deletion src/BUTR.Site.NexusMods.Client/Options/BackendOptions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace BUTR.Site.NexusMods.Client.Options;
namespace BUTR.Site.NexusMods.Client.Options;

public sealed record BackendOptions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Blazorise.Charts;
using Blazorise.Charts;
using Blazorise.LoadingIndicator;

using BUTR.Site.NexusMods.Client.Components.Grid;
Expand All @@ -19,7 +19,7 @@ public partial class StatisticsExceptionTypes
private IStatisticsClient StatisticsClient { get; set; } = default!;

private LoadingIndicator loadingIndicator = default!;

private DoughnutChart<double> doughnutChart = default!;
private readonly DoughnutChartOptions doughnutChartOptions = new()
{
Expand All @@ -32,9 +32,9 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (!firstRender)
return;

await loadingIndicator.Show();

var data = (await StatisticsClient.TopExceptionsTypesAsync()).Value ?? Array.Empty<TopExceptionsEntry>();

_dataGridRef.Values = data;
Expand All @@ -45,7 +45,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
await doughnutChart.AddLabelsDatasetsAndUpdate(labels, new DoughnutChartDataset<double> { Label = "Top Exception Types", Data = values, BackgroundColor = ChartUtiities.GetColors(data.Count, 0.2f).ToList(), BorderColor = ChartUtiities.GetColors(data.Count, 1f).ToList(), BorderWidth = 1 });

await loadingIndicator.Hide();

await base.OnAfterRenderAsync(firstRender);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Blazorise.Charts;
using Blazorise.Charts;
using Blazorise.Components;

using BUTR.Site.NexusMods.Client.Extensions;
Expand Down
6 changes: 3 additions & 3 deletions src/BUTR.Site.NexusMods.Client/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Blazored.LocalStorage;
using Blazored.LocalStorage;
using Blazored.SessionStorage;

using Blazorise;
Expand Down Expand Up @@ -63,15 +63,15 @@ public static WebAssemblyHostBuilder CreateHostBuilder(string[] args)
{
var assemblyName = Assembly.GetEntryAssembly()?.GetName();
var userAgent = $"{assemblyName?.Name ?? "ERROR"} v{assemblyName?.Version?.ToString() ?? "ERROR"}";

return WebAssemblyHostBuilder
.CreateDefault(args)
.AddRootComponent<App>("#app")
.ConfigureServices((builder, services) =>
{
services.Configure<BackendOptions>(builder.Configuration.GetSection("Backend"));

services.AddScoped(_ => new HttpClient {BaseAddress = new Uri(builder.HostEnvironment.BaseAddress), DefaultRequestHeaders = {{"User-Agent", userAgent}}});
services.AddScoped(_ => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress), DefaultRequestHeaders = { { "User-Agent", userAgent } } });
services.AddHttpClient("InternalReports").ConfigureHttpClient((_, client) =>
{
client.BaseAddress = new Uri($"{builder.HostEnvironment.BaseAddress}reports/");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BUTR.Site.NexusMods.Client.Models;
using BUTR.Site.NexusMods.Client.Models;
using BUTR.Site.NexusMods.ServerClient;

using System;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BUTR.Site.NexusMods.Client.Models;
using BUTR.Site.NexusMods.Client.Models;
using BUTR.Site.NexusMods.ServerClient;
using BUTR.Site.NexusMods.ServerClient.Utils;

Expand All @@ -22,7 +22,7 @@ public CrashReportsClientWithStreaming(HttpClient httpClient) : base(httpClient)
protected override void OnPrepareRequest(HttpClient client, HttpRequestMessage request, StringBuilder urlBuilder)
{
request.SetBrowserResponseStreamingEnabled(true);

base.OnPrepareRequest(client, request, urlBuilder);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.IO;
using System.Net.Http;
using System.Threading;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Blazorise;
using Blazorise;

using System;
using System.Net;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Blazorise;
using Blazorise;

using System;
using System.Net.Http;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Net.Http;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BUTR.Site.NexusMods.ServerClient;
using BUTR.Site.NexusMods.ServerClient;

using System;
using System.Threading;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BUTR.Site.NexusMods.Client.Models;
using BUTR.Site.NexusMods.Client.Models;
using BUTR.Site.NexusMods.ServerClient;

using System;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BUTR.Site.NexusMods.Shared.Helpers;
using BUTR.Site.NexusMods.Shared.Helpers;

using Microsoft.AspNetCore.Components.Authorization;

Expand Down
4 changes: 2 additions & 2 deletions src/BUTR.Site.NexusMods.Client/Services/TenantProvider.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Blazored.LocalStorage;
using Blazored.LocalStorage;

using System.Threading;
using System.Threading.Tasks;
Expand All @@ -16,7 +16,7 @@ public TenantProvider(ILocalStorageService localStorage)

public async Task<int> GetTenantAsync()
{
if (! await _localStorage.ContainKeyAsync("tenant"))
if (!await _localStorage.ContainKeyAsync("tenant"))
await SetTenantAsync(1);

return await _localStorage.GetItemAsync<int>("tenant", CancellationToken.None);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;

using System;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;

using System;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;

using System;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;

using System;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Threading;
using System.Threading.Tasks;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Blazorise.Localization;
using Blazorise.Localization;

using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Blazored.LocalStorage;
using Blazored.LocalStorage;

using System;
using System.Threading;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;

using System;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Blazored.SessionStorage;
using Blazored.SessionStorage;

using Microsoft.Extensions.Options;
using Microsoft.Extensions.Primitives;
Expand Down
2 changes: 1 addition & 1 deletion src/BUTR.Site.NexusMods.Client/Utils/ChartUtilities.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Blazorise.Charts;
using Blazorise.Charts;

using System;
using System.Collections.Generic;
Expand Down
2 changes: 1 addition & 1 deletion src/BUTR.Site.NexusMods.Client/Utils/DataGridUtils.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Blazorise.DataGrid;
using Blazorise.DataGrid;

namespace BUTR.Site.NexusMods.Client.Utils;

Expand Down
2 changes: 1 addition & 1 deletion src/BUTR.Site.NexusMods.Client/Utils/ProgressUtils.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Blazorise.Utilities;
using Blazorise.Utilities;

using System;
using System.Threading;
Expand Down
2 changes: 1 addition & 1 deletion src/BUTR.Site.NexusMods.Client/Utils/UserSettings.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace BUTR.Site.NexusMods.Client.Utils;
namespace BUTR.Site.NexusMods.Client.Utils;

public sealed record UserSettings
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace BUTR.Site.NexusMods.Server.Contexts;

public class AppDbContextFactory: IAppDbContextFactory
public class AppDbContextFactory : IAppDbContextFactory
{
private readonly IDbContextFactory<AppDbContextWrite> _dbContextFactoryWrite;
private readonly IDbContextFactory<AppDbContextRead> _dbContextFactoryRead;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public sealed class AppDbContextRead : BaseAppDbContext, IAppDbContextRead
{
public static Exception WriteNotSupported() => throw new NotSupportedException($"Write operations not supported with '{nameof(AppDbContextRead)}'!");


private readonly IDbContextFactory<AppDbContextRead> _dbContextFactory;

public AppDbContextRead(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)

base.OnConfiguring(optionsBuilder);
}


public AppDbContextWrite New() => _dbContextFactory.CreateDbContext();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BUTR.Site.NexusMods.Server.Models.Database;
using BUTR.Site.NexusMods.Server.Models.Database;
using BUTR.Site.NexusMods.Server.Options;

using Microsoft.EntityFrameworkCore;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BUTR.Site.NexusMods.Server.Models.Database;
using BUTR.Site.NexusMods.Server.Models.Database;

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BUTR.Site.NexusMods.Server.Models.Database;
using BUTR.Site.NexusMods.Server.Models.Database;

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BUTR.Site.NexusMods.Server.Extensions;
using BUTR.Site.NexusMods.Server.Extensions;
using BUTR.Site.NexusMods.Server.Models.Database;

using Microsoft.EntityFrameworkCore;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BUTR.Site.NexusMods.Server.Extensions;
using BUTR.Site.NexusMods.Server.Extensions;
using BUTR.Site.NexusMods.Server.Models;
using BUTR.Site.NexusMods.Server.Models.Database;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BUTR.Site.NexusMods.Server.Extensions;
using BUTR.Site.NexusMods.Server.Extensions;
using BUTR.Site.NexusMods.Server.Models.Database;

using Microsoft.EntityFrameworkCore;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BUTR.Site.NexusMods.Server.Extensions;
using BUTR.Site.NexusMods.Server.Extensions;
using BUTR.Site.NexusMods.Server.Models.Database;

using Microsoft.EntityFrameworkCore;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BUTR.Site.NexusMods.Server.Extensions;
using BUTR.Site.NexusMods.Server.Extensions;
using BUTR.Site.NexusMods.Server.Models.Database;

using Microsoft.EntityFrameworkCore;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BUTR.Site.NexusMods.Server.Extensions;
using BUTR.Site.NexusMods.Server.Extensions;
using BUTR.Site.NexusMods.Server.Models;
using BUTR.Site.NexusMods.Server.Models.Database;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BUTR.Site.NexusMods.Server.Extensions;
using BUTR.Site.NexusMods.Server.Extensions;
using BUTR.Site.NexusMods.Server.Models.Database;

using Microsoft.EntityFrameworkCore;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BUTR.Site.NexusMods.Server.Extensions;
using BUTR.Site.NexusMods.Server.Extensions;
using BUTR.Site.NexusMods.Server.Models;
using BUTR.Site.NexusMods.Server.Models.Database;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BUTR.Site.NexusMods.Server.Extensions;
using BUTR.Site.NexusMods.Server.Extensions;
using BUTR.Site.NexusMods.Server.Models.Database;

using Microsoft.EntityFrameworkCore;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BUTR.Site.NexusMods.Server.Extensions;
using BUTR.Site.NexusMods.Server.Extensions;
using BUTR.Site.NexusMods.Server.Models;
using BUTR.Site.NexusMods.Server.Models.Database;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BUTR.Site.NexusMods.Server.Extensions;
using BUTR.Site.NexusMods.Server.Extensions;
using BUTR.Site.NexusMods.Server.Models.Database;

using Microsoft.EntityFrameworkCore;
Expand Down
Loading

0 comments on commit e3c855f

Please sign in to comment.