From 38e60a81d090a97406864da3d0fbfc0de74f7b49 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 17 Dec 2023 00:03:29 +0000 Subject: [PATCH] Automated dotnet-format update --- .../Extensions/OpenApiExtensions.cs | 2 +- .../Models/ApplicationRole.cs | 2 +- .../Models/CrashReportId.cs | 2 +- .../Models/CrashReportUrl.cs | 2 +- .../Models/IValueObjectFrom.cs | 2 +- .../Models/NexusModsApiKey.cs | 2 +- .../Models/NexusModsArticleId.cs | 2 +- .../Models/NexusModsGameDomain.cs | 2 +- .../Models/NexusModsModId.cs | 2 +- .../Models/NexusModsUserEMail.cs | 2 +- .../Models/NexusModsUserId.cs | 4 ++-- .../Models/NexusModsUserName.cs | 2 +- .../Models/TenantId.cs | 2 +- .../Usings.cs | 20 +++++++++++-------- .../TransparentValueObjectTypeConverter.cs | 2 +- .../Utils/_QueryableHelper.cs | 2 +- 16 files changed, 28 insertions(+), 24 deletions(-) diff --git a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Extensions/OpenApiExtensions.cs b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Extensions/OpenApiExtensions.cs index 6a193c27..d4628005 100644 --- a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Extensions/OpenApiExtensions.cs +++ b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Extensions/OpenApiExtensions.cs @@ -1,4 +1,4 @@ -namespace BUTR.Site.NexusMods.Server.Models; +namespace BUTR.Site.NexusMods.Server.Models; public static class OpenApiExtensions { diff --git a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/ApplicationRole.cs b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/ApplicationRole.cs index 371f2881..f1116fc1 100644 --- a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/ApplicationRole.cs +++ b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/ApplicationRole.cs @@ -10,7 +10,7 @@ namespace BUTR.Site.NexusMods.Server.Models; public static readonly TType User = From(ApplicationRoles.User); public static readonly TType Moderator = From(ApplicationRoles.Moderator); public static readonly TType Administrator = From(ApplicationRoles.Administrator); - + public static TType DefaultValue => Anonymous; } diff --git a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/CrashReportId.cs b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/CrashReportId.cs index 5539593c..d9026670 100644 --- a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/CrashReportId.cs +++ b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/CrashReportId.cs @@ -7,7 +7,7 @@ namespace BUTR.Site.NexusMods.Server.Models; public readonly partial struct CrashReportId : IAugmentWith { public static TType DefaultValue => From(Guid.Empty); - + public static TType NewRandomValue(Random? random) => From(Guid.NewGuid()); } diff --git a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/CrashReportUrl.cs b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/CrashReportUrl.cs index 9ef531dc..961b0c72 100644 --- a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/CrashReportUrl.cs +++ b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/CrashReportUrl.cs @@ -7,7 +7,7 @@ namespace BUTR.Site.NexusMods.Server.Models; public readonly partial struct CrashReportUrl : IAugmentWith { public static TType DefaultValue => From(string.Empty); - + public static TType From(Uri uri) => From(uri.ToString()); } diff --git a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/IValueObjectFrom.cs b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/IValueObjectFrom.cs index 665ddc36..58d577ee 100644 --- a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/IValueObjectFrom.cs +++ b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/IValueObjectFrom.cs @@ -1,4 +1,4 @@ -namespace BUTR.Site.NexusMods.Server.Models; +namespace BUTR.Site.NexusMods.Server.Models; internal interface IValueObjectFrom where TValueType : IValueObjectFrom diff --git a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsApiKey.cs b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsApiKey.cs index 04e18440..583b6889 100644 --- a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsApiKey.cs +++ b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsApiKey.cs @@ -8,7 +8,7 @@ namespace BUTR.Site.NexusMods.Server.Models; public readonly partial struct NexusModsApiKey : IAugmentWith, IValueObjectFrom { public static readonly TType None = From(string.Empty); - + public static TType DefaultValue => None; } diff --git a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsArticleId.cs b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsArticleId.cs index 7e922a66..5a079641 100644 --- a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsArticleId.cs +++ b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsArticleId.cs @@ -16,7 +16,7 @@ public static bool TryParse(string articleIdRaw, out TType articleId) articleId = result ? From(articleIdVal) : DefaultValue; return result; } - + public static bool TryParseUrl(string? urlRaw, out TType articleId) { articleId = From(0); diff --git a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsGameDomain.cs b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsGameDomain.cs index 3dce0b4e..00a75ed7 100644 --- a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsGameDomain.cs +++ b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsGameDomain.cs @@ -10,7 +10,7 @@ namespace BUTR.Site.NexusMods.Server.Models; public static readonly TType Bannerlord = From(TenantUtils.BannerlordGameDomain); public static readonly TType Rimworld = From(TenantUtils.RimworldGameDomain); public static readonly TType StardewValley = From(TenantUtils.StardewValleyGameDomain); - + public static TType DefaultValue => None; public static IEnumerable Values diff --git a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsModId.cs b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsModId.cs index 87d8f65a..c870ae5c 100644 --- a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsModId.cs +++ b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsModId.cs @@ -15,7 +15,7 @@ public static bool TryParse(string modIdRaw, out TType modId) modId = result ? From(modIdVal) : DefaultValue; return result; } - + public static bool TryParseUrl(string? urlRaw, out TType modId) { modId = DefaultValue; diff --git a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsUserEMail.cs b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsUserEMail.cs index 73f82032..fa94377c 100644 --- a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsUserEMail.cs +++ b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsUserEMail.cs @@ -7,7 +7,7 @@ namespace BUTR.Site.NexusMods.Server.Models; public readonly partial struct NexusModsUserEMail : IAugmentWith { public static readonly TType Empty = From(string.Empty); - + public static TType DefaultValue => Empty; } diff --git a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsUserId.cs b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsUserId.cs index 1ffec74d..2e601cfc 100644 --- a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsUserId.cs +++ b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsUserId.cs @@ -7,7 +7,7 @@ namespace BUTR.Site.NexusMods.Server.Models; public readonly partial struct NexusModsUserId : IAugmentWith { public static readonly TType None = From(0); - + public static TType DefaultValue => None; public static bool TryParse(string userIdRaw, out TType userId) @@ -16,7 +16,7 @@ public static bool TryParse(string userIdRaw, out TType userId) userId = result ? From(userIdVal) : DefaultValue; return result; } - + public static bool TryParseUrl(string? urlRaw, out TType userId) { userId = DefaultValue; diff --git a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsUserName.cs b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsUserName.cs index 22229f3c..068a860b 100644 --- a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsUserName.cs +++ b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/NexusModsUserName.cs @@ -7,7 +7,7 @@ namespace BUTR.Site.NexusMods.Server.Models; public readonly partial struct NexusModsUserName : IAugmentWith { public static readonly TType Empty = From(string.Empty); - + public static TType DefaultValue => Empty; } diff --git a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/TenantId.cs b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/TenantId.cs index ca8b7996..784c90ff 100644 --- a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/TenantId.cs +++ b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Models/TenantId.cs @@ -11,7 +11,7 @@ namespace BUTR.Site.NexusMods.Server.Models; public static readonly TType Bannerlord = From(TenantUtils.BannerlordId); public static readonly TType Rimworld = From(TenantUtils.RimworldId); public static readonly TType StardewValley = From(TenantUtils.StardewValleyId); - + public static TType DefaultValue => None; public static IEnumerable Values diff --git a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Usings.cs b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Usings.cs index fbe83907..a78c9356 100644 --- a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Usings.cs +++ b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Usings.cs @@ -1,20 +1,24 @@ -global using BUTR.Site.NexusMods.Shared.Helpers; global using BUTR.Site.NexusMods.Server.Models; -global using BUTR.Site.NexusMods.Server.ValueObjects.Utils; global using BUTR.Site.NexusMods.Server.Utils; -global using Microsoft.Extensions.DependencyInjection; +global using BUTR.Site.NexusMods.Server.ValueObjects.Utils; +global using BUTR.Site.NexusMods.Shared.Helpers; + global using Microsoft.EntityFrameworkCore; global using Microsoft.EntityFrameworkCore.ChangeTracking; -global using Microsoft.EntityFrameworkCore.Storage.ValueConversion; global using Microsoft.EntityFrameworkCore.Metadata.Builders; +global using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +global using Microsoft.Extensions.DependencyInjection; global using Microsoft.OpenApi.Models; + +global using Swashbuckle.AspNetCore.SwaggerGen; + +global using System.ComponentModel; global using System.Diagnostics.CodeAnalysis; +global using System.Globalization; +global using System.Reflection; global using System.Runtime.CompilerServices; global using System.Runtime.InteropServices; global using System.Text.Json; global using System.Text.Json.Serialization; -global using System.ComponentModel; -global using System.Globalization; -global using System.Reflection; -global using Swashbuckle.AspNetCore.SwaggerGen; + global using TransparentValueObjects; \ No newline at end of file diff --git a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Utils/TransparentValueObjectTypeConverter.cs b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Utils/TransparentValueObjectTypeConverter.cs index 521f59fa..9556f077 100644 --- a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Utils/TransparentValueObjectTypeConverter.cs +++ b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Utils/TransparentValueObjectTypeConverter.cs @@ -1,4 +1,4 @@ -namespace BUTR.Site.NexusMods.Server.ValueObjects.Utils; +namespace BUTR.Site.NexusMods.Server.ValueObjects.Utils; internal class TransparentValueObjectTypeConverter : TypeConverter where TValueType : struct, IValueObjectFrom diff --git a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Utils/_QueryableHelper.cs b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Utils/_QueryableHelper.cs index 649571ac..cb2ead6c 100644 --- a/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Utils/_QueryableHelper.cs +++ b/src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/Utils/_QueryableHelper.cs @@ -1,4 +1,4 @@ -namespace BUTR.Site.NexusMods.Server.Utils; +namespace BUTR.Site.NexusMods.Server.Utils; public static class QueryableHelper {