Misc code syntax

This commit is contained in:
Archi
2024-01-03 15:06:08 +01:00
parent bb73916af0
commit 1f2269dcf2
4 changed files with 8 additions and 8 deletions

View File

@@ -30,6 +30,6 @@ namespace ArchiSteamFarm.OfficialPlugins.SteamTokenDumper;
public sealed class SteamTokenDumperController : ArchiController {
[HttpGet(nameof(GlobalConfigExtension))]
[ProducesResponseType<GlobalConfigExtension>((int) HttpStatusCode.OK)]
[SwaggerOperation(Tags = new[] { nameof(GlobalConfigExtension) })]
[SwaggerOperation(Tags = [nameof(GlobalConfigExtension)])]
public ActionResult<GlobalConfigExtension> Get() => Ok(new GlobalConfigExtension());
}

View File

@@ -69,13 +69,13 @@ public static class SharedInfo {
internal const string WebsiteDirectory = "www";
[PublicAPI]
public static readonly char[] ListElementSeparators = { ',' };
public static readonly char[] ListElementSeparators = [','];
[PublicAPI]
public static readonly string[] NewLineIndicators = { "\r\n", "\r", "\n" };
public static readonly string[] NewLineIndicators = ["\r\n", "\r", "\n"];
[PublicAPI]
public static readonly string[] RangeIndicators = { ".." };
public static readonly string[] RangeIndicators = [".."];
internal static string HomeDirectory {
get {

View File

@@ -162,7 +162,7 @@ public sealed class BotConfig {
public EBotBehaviour BotBehaviour { get; private set; } = DefaultBotBehaviour;
[JsonProperty(Required = Required.DisallowNull)]
[SwaggerValidValues(ValidIntValues = new[] { (int) Asset.EType.FoilTradingCard, (int) Asset.EType.TradingCard })]
[SwaggerValidValues(ValidIntValues = [(int) Asset.EType.FoilTradingCard, (int) Asset.EType.TradingCard])]
public ImmutableHashSet<Asset.EType> CompleteTypesToSend { get; private set; } = DefaultCompleteTypesToSend;
[JsonProperty]
@@ -242,13 +242,13 @@ public sealed class BotConfig {
[JsonProperty(Required = Required.DisallowNull)]
[SwaggerSteamIdentifier(AccountType = EAccountType.Clan)]
[SwaggerValidValues(ValidIntValues = new[] { 0 })]
[SwaggerValidValues(ValidIntValues = [0])]
public ulong SteamMasterClanID { get; private set; } = DefaultSteamMasterClanID;
[JsonProperty]
[MaxLength(SteamParentalCodeLength)]
[MinLength(SteamParentalCodeLength)]
[SwaggerValidValues(ValidStringValues = new[] { "0" })]
[SwaggerValidValues(ValidStringValues = ["0"])]
[UnconditionalSuppressMessage("AssemblyLoadTrimming", "IL2026:RequiresUnreferencedCode", Justification = "This is optional, supportive attribute, we don't care if it gets trimmed or not")]
public string? SteamParentalCode {
get => BackingSteamParentalCode;

View File

@@ -282,7 +282,7 @@ public sealed class GlobalConfig {
[JsonProperty(Required = Required.DisallowNull)]
[SwaggerSteamIdentifier]
[SwaggerValidValues(ValidIntValues = new[] { 0 })]
[SwaggerValidValues(ValidIntValues = [0])]
public ulong SteamOwnerID { get; private set; } = DefaultSteamOwnerID;
[JsonProperty(Required = Required.DisallowNull)]