Skip to content

Commit

Permalink
Misc code syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
JustArchi committed Jan 3, 2024
1 parent bb73916 commit 1f2269d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
6 changes: 3 additions & 3 deletions ArchiSteamFarm/SharedInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions ArchiSteamFarm/Steam/Storage/BotConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -242,13 +242,13 @@ internal set {

[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;
Expand Down
2 changes: 1 addition & 1 deletion ArchiSteamFarm/Storage/GlobalConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ internal set {

[JsonProperty(Required = Required.DisallowNull)]
[SwaggerSteamIdentifier]
[SwaggerValidValues(ValidIntValues = new[] { 0 })]
[SwaggerValidValues(ValidIntValues = [0])]
public ulong SteamOwnerID { get; private set; } = DefaultSteamOwnerID;

[JsonProperty(Required = Required.DisallowNull)]
Expand Down

0 comments on commit 1f2269d

Please sign in to comment.