mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-02-01 10:17:44 +00:00
Cleanup some obsolete warnings
This commit is contained in:
@@ -53,10 +53,8 @@ namespace ArchiSteamFarm.CustomPlugins.ExamplePlugin {
|
|||||||
|
|
||||||
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
|
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
|
||||||
private sealed class MeowResponse {
|
private sealed class MeowResponse {
|
||||||
#pragma warning disable 649
|
|
||||||
[JsonProperty(PropertyName = "file", Required = Required.Always)]
|
[JsonProperty(PropertyName = "file", Required = Required.Always)]
|
||||||
internal readonly string Link = "";
|
internal readonly string Link = "";
|
||||||
#pragma warning restore 649
|
|
||||||
|
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
private MeowResponse() { }
|
private MeowResponse() { }
|
||||||
|
|||||||
@@ -27,42 +27,32 @@ using SteamKit2;
|
|||||||
|
|
||||||
namespace ArchiSteamFarm.OfficialPlugins.SteamTokenDumper {
|
namespace ArchiSteamFarm.OfficialPlugins.SteamTokenDumper {
|
||||||
internal sealed class RequestData {
|
internal sealed class RequestData {
|
||||||
#pragma warning disable IDE0052
|
|
||||||
[JsonProperty(PropertyName = "apps", Required = Required.Always)]
|
[JsonProperty(PropertyName = "apps", Required = Required.Always)]
|
||||||
private readonly ImmutableDictionary<string, string> Apps;
|
private readonly ImmutableDictionary<string, string> Apps;
|
||||||
#pragma warning restore IDE0052
|
|
||||||
|
|
||||||
#pragma warning disable IDE0052
|
|
||||||
[JsonProperty(PropertyName = "depots", Required = Required.Always)]
|
[JsonProperty(PropertyName = "depots", Required = Required.Always)]
|
||||||
private readonly ImmutableDictionary<string, string> Depots;
|
private readonly ImmutableDictionary<string, string> Depots;
|
||||||
#pragma warning restore IDE0052
|
|
||||||
|
|
||||||
#pragma warning disable IDE0052
|
|
||||||
[JsonProperty(PropertyName = "guid", Required = Required.Always)]
|
[JsonProperty(PropertyName = "guid", Required = Required.Always)]
|
||||||
private readonly string Guid = ASF.GlobalDatabase?.Identifier.ToString("N") ?? throw new InvalidOperationException(nameof(ASF.GlobalDatabase.Identifier));
|
private readonly string Guid = ASF.GlobalDatabase?.Identifier.ToString("N") ?? throw new InvalidOperationException(nameof(ASF.GlobalDatabase.Identifier));
|
||||||
#pragma warning restore IDE0052
|
|
||||||
|
|
||||||
private readonly ulong SteamID;
|
private readonly ulong SteamID;
|
||||||
|
|
||||||
#pragma warning disable IDE0052
|
|
||||||
[JsonProperty(PropertyName = "subs", Required = Required.Always)]
|
[JsonProperty(PropertyName = "subs", Required = Required.Always)]
|
||||||
private readonly ImmutableDictionary<string, string> Subs;
|
private readonly ImmutableDictionary<string, string> Subs;
|
||||||
#pragma warning restore IDE0052
|
|
||||||
|
|
||||||
#pragma warning disable IDE0051, 414
|
#pragma warning disable CS0414
|
||||||
[JsonProperty(PropertyName = "token", Required = Required.Always)]
|
[JsonProperty(PropertyName = "token", Required = Required.Always)]
|
||||||
private readonly string Token = SharedInfo.Token;
|
private readonly string Token = SharedInfo.Token;
|
||||||
#pragma warning restore IDE0051, 414
|
#pragma warning restore CS0414
|
||||||
|
|
||||||
#pragma warning disable IDE0051, 414
|
#pragma warning disable CS0414
|
||||||
[JsonProperty(PropertyName = "v", Required = Required.Always)]
|
[JsonProperty(PropertyName = "v", Required = Required.Always)]
|
||||||
private readonly byte Version = SharedInfo.ApiVersion;
|
private readonly byte Version = SharedInfo.ApiVersion;
|
||||||
#pragma warning restore IDE0051, 414
|
#pragma warning restore CS0414
|
||||||
|
|
||||||
#pragma warning disable IDE0051
|
|
||||||
[JsonProperty(PropertyName = "steamid", Required = Required.Always)]
|
[JsonProperty(PropertyName = "steamid", Required = Required.Always)]
|
||||||
private string SteamIDText => new SteamID(SteamID).Render();
|
private string SteamIDText => new SteamID(SteamID).Render();
|
||||||
#pragma warning restore IDE0051
|
|
||||||
|
|
||||||
internal RequestData(ulong steamID, IReadOnlyCollection<KeyValuePair<uint, ulong>> apps, IReadOnlyCollection<KeyValuePair<uint, ulong>> accessTokens, IReadOnlyCollection<KeyValuePair<uint, string>> depots) {
|
internal RequestData(ulong steamID, IReadOnlyCollection<KeyValuePair<uint, ulong>> apps, IReadOnlyCollection<KeyValuePair<uint, ulong>> accessTokens, IReadOnlyCollection<KeyValuePair<uint, string>> depots) {
|
||||||
if ((steamID == 0) || !new SteamID(steamID).IsIndividualAccount) {
|
if ((steamID == 0) || !new SteamID(steamID).IsIndividualAccount) {
|
||||||
|
|||||||
@@ -25,34 +25,32 @@ using Newtonsoft.Json;
|
|||||||
namespace ArchiSteamFarm.OfficialPlugins.SteamTokenDumper {
|
namespace ArchiSteamFarm.OfficialPlugins.SteamTokenDumper {
|
||||||
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
|
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
|
||||||
internal sealed class ResponseData {
|
internal sealed class ResponseData {
|
||||||
#pragma warning disable 649
|
|
||||||
[JsonProperty(PropertyName = "data", Required = Required.Always)]
|
[JsonProperty(PropertyName = "data", Required = Required.Always)]
|
||||||
internal readonly InternalData Data = new();
|
internal readonly InternalData Data = new();
|
||||||
#pragma warning restore 649
|
|
||||||
|
|
||||||
#pragma warning disable 649
|
#pragma warning disable CS0649
|
||||||
[JsonProperty(PropertyName = "success", Required = Required.Always)]
|
[JsonProperty(PropertyName = "success", Required = Required.Always)]
|
||||||
internal readonly bool Success;
|
internal readonly bool Success;
|
||||||
#pragma warning restore 649
|
#pragma warning restore CS0649
|
||||||
|
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
private ResponseData() { }
|
private ResponseData() { }
|
||||||
|
|
||||||
internal sealed class InternalData {
|
internal sealed class InternalData {
|
||||||
#pragma warning disable 649
|
#pragma warning disable CS0649
|
||||||
[JsonProperty(PropertyName = "new_apps", Required = Required.Always)]
|
[JsonProperty(PropertyName = "new_apps", Required = Required.Always)]
|
||||||
internal readonly uint NewAppsCount;
|
internal readonly uint NewAppsCount;
|
||||||
#pragma warning restore 649
|
#pragma warning restore CS0649
|
||||||
|
|
||||||
#pragma warning disable 649
|
#pragma warning disable CS0649
|
||||||
[JsonProperty(PropertyName = "new_depots", Required = Required.Always)]
|
[JsonProperty(PropertyName = "new_depots", Required = Required.Always)]
|
||||||
internal readonly uint NewDepotsCount;
|
internal readonly uint NewDepotsCount;
|
||||||
#pragma warning restore 649
|
#pragma warning restore CS0649
|
||||||
|
|
||||||
#pragma warning disable 649
|
#pragma warning disable CS0649
|
||||||
[JsonProperty(PropertyName = "new_subs", Required = Required.Always)]
|
[JsonProperty(PropertyName = "new_subs", Required = Required.Always)]
|
||||||
internal readonly uint NewSubsCount;
|
internal readonly uint NewSubsCount;
|
||||||
#pragma warning restore 649
|
#pragma warning restore CS0649
|
||||||
|
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
internal InternalData() { }
|
internal InternalData() { }
|
||||||
|
|||||||
@@ -147,7 +147,6 @@ namespace ArchiSteamFarm {
|
|||||||
private readonly SteamUser SteamUser;
|
private readonly SteamUser SteamUser;
|
||||||
private readonly Trading Trading;
|
private readonly Trading Trading;
|
||||||
|
|
||||||
#pragma warning disable CS8605
|
|
||||||
private IEnumerable<(string FilePath, EFileType FileType)> RelatedFiles {
|
private IEnumerable<(string FilePath, EFileType FileType)> RelatedFiles {
|
||||||
get {
|
get {
|
||||||
foreach (EFileType fileType in Enum.GetValues(typeof(EFileType))) {
|
foreach (EFileType fileType in Enum.GetValues(typeof(EFileType))) {
|
||||||
@@ -163,13 +162,10 @@ namespace ArchiSteamFarm {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#pragma warning restore CS8605
|
|
||||||
|
|
||||||
#pragma warning disable IDE0051
|
|
||||||
[JsonProperty(PropertyName = SharedInfo.UlongCompatibilityStringPrefix + nameof(SteamID))]
|
[JsonProperty(PropertyName = SharedInfo.UlongCompatibilityStringPrefix + nameof(SteamID))]
|
||||||
|
|
||||||
private string SSteamID => SteamID.ToString(CultureInfo.InvariantCulture);
|
private string SSteamID => SteamID.ToString(CultureInfo.InvariantCulture);
|
||||||
#pragma warning restore IDE0051
|
|
||||||
|
|
||||||
[JsonProperty]
|
[JsonProperty]
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
@@ -209,10 +205,8 @@ namespace ArchiSteamFarm {
|
|||||||
|
|
||||||
private string? AuthCode;
|
private string? AuthCode;
|
||||||
|
|
||||||
#pragma warning disable IDE0052
|
|
||||||
[JsonProperty]
|
[JsonProperty]
|
||||||
private string? AvatarHash;
|
private string? AvatarHash;
|
||||||
#pragma warning restore IDE0052
|
|
||||||
|
|
||||||
private Timer? ConnectionFailureTimer;
|
private Timer? ConnectionFailureTimer;
|
||||||
private bool FirstTradeSent;
|
private bool FirstTradeSent;
|
||||||
@@ -1569,7 +1563,6 @@ namespace ArchiSteamFarm {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning disable CS8605
|
|
||||||
internal static IOrderedDictionary ValidateGamesToRedeemInBackground(IOrderedDictionary gamesToRedeemInBackground) {
|
internal static IOrderedDictionary ValidateGamesToRedeemInBackground(IOrderedDictionary gamesToRedeemInBackground) {
|
||||||
if ((gamesToRedeemInBackground == null) || (gamesToRedeemInBackground.Count == 0)) {
|
if ((gamesToRedeemInBackground == null) || (gamesToRedeemInBackground.Count == 0)) {
|
||||||
throw new ArgumentNullException(nameof(gamesToRedeemInBackground));
|
throw new ArgumentNullException(nameof(gamesToRedeemInBackground));
|
||||||
@@ -1610,7 +1603,6 @@ namespace ArchiSteamFarm {
|
|||||||
|
|
||||||
return gamesToRedeemInBackground;
|
return gamesToRedeemInBackground;
|
||||||
}
|
}
|
||||||
#pragma warning restore CS8605
|
|
||||||
|
|
||||||
private async Task CheckOccupationStatus() {
|
private async Task CheckOccupationStatus() {
|
||||||
StopPlayingWasBlockedTimer();
|
StopPlayingWasBlockedTimer();
|
||||||
|
|||||||
@@ -170,7 +170,6 @@ namespace ArchiSteamFarm {
|
|||||||
return botDatabase;
|
return botDatabase;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning disable CS8605
|
|
||||||
internal (string? Key, string? Name) GetGameToRedeemInBackground() {
|
internal (string? Key, string? Name) GetGameToRedeemInBackground() {
|
||||||
lock (GamesToRedeemInBackground) {
|
lock (GamesToRedeemInBackground) {
|
||||||
foreach (DictionaryEntry game in GamesToRedeemInBackground) {
|
foreach (DictionaryEntry game in GamesToRedeemInBackground) {
|
||||||
@@ -180,7 +179,6 @@ namespace ArchiSteamFarm {
|
|||||||
|
|
||||||
return (null, null);
|
return (null, null);
|
||||||
}
|
}
|
||||||
#pragma warning restore CS8605
|
|
||||||
|
|
||||||
internal void RemoveGameToRedeemInBackground(string key) {
|
internal void RemoveGameToRedeemInBackground(string key) {
|
||||||
if (string.IsNullOrEmpty(key)) {
|
if (string.IsNullOrEmpty(key)) {
|
||||||
|
|||||||
@@ -160,10 +160,8 @@ namespace ArchiSteamFarm {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning disable 649
|
|
||||||
[JsonProperty(PropertyName = "body", Required = Required.Always)]
|
[JsonProperty(PropertyName = "body", Required = Required.Always)]
|
||||||
private readonly string? MarkdownBody;
|
private readonly string? MarkdownBody = "";
|
||||||
#pragma warning restore 649
|
|
||||||
|
|
||||||
private MarkdownDocument? Changelog {
|
private MarkdownDocument? Changelog {
|
||||||
get {
|
get {
|
||||||
|
|||||||
@@ -96,7 +96,6 @@ namespace ArchiSteamFarm.Json {
|
|||||||
[JsonExtensionData]
|
[JsonExtensionData]
|
||||||
internal Dictionary<string, JToken>? AdditionalProperties { private get; set; }
|
internal Dictionary<string, JToken>? AdditionalProperties { private get; set; }
|
||||||
|
|
||||||
#pragma warning disable IDE0051
|
|
||||||
[JsonProperty(PropertyName = "amount", Required = Required.Always)]
|
[JsonProperty(PropertyName = "amount", Required = Required.Always)]
|
||||||
private string AmountText {
|
private string AmountText {
|
||||||
get => Amount.ToString(CultureInfo.InvariantCulture);
|
get => Amount.ToString(CultureInfo.InvariantCulture);
|
||||||
@@ -117,9 +116,7 @@ namespace ArchiSteamFarm.Json {
|
|||||||
Amount = amount;
|
Amount = amount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#pragma warning restore IDE0051
|
|
||||||
|
|
||||||
#pragma warning disable IDE0052
|
|
||||||
[JsonProperty(PropertyName = "assetid", Required = Required.DisallowNull)]
|
[JsonProperty(PropertyName = "assetid", Required = Required.DisallowNull)]
|
||||||
private string AssetIDText {
|
private string AssetIDText {
|
||||||
get => AssetID.ToString(CultureInfo.InvariantCulture);
|
get => AssetID.ToString(CultureInfo.InvariantCulture);
|
||||||
@@ -140,9 +137,7 @@ namespace ArchiSteamFarm.Json {
|
|||||||
AssetID = assetID;
|
AssetID = assetID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#pragma warning restore IDE0052
|
|
||||||
|
|
||||||
#pragma warning disable IDE0051
|
|
||||||
[JsonProperty(PropertyName = "classid", Required = Required.DisallowNull)]
|
[JsonProperty(PropertyName = "classid", Required = Required.DisallowNull)]
|
||||||
private string ClassIDText {
|
private string ClassIDText {
|
||||||
set {
|
set {
|
||||||
@@ -159,9 +154,7 @@ namespace ArchiSteamFarm.Json {
|
|||||||
ClassID = classID;
|
ClassID = classID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#pragma warning restore IDE0051
|
|
||||||
|
|
||||||
#pragma warning disable IDE0051
|
|
||||||
[JsonProperty(PropertyName = "contextid", Required = Required.DisallowNull)]
|
[JsonProperty(PropertyName = "contextid", Required = Required.DisallowNull)]
|
||||||
private string ContextIDText {
|
private string ContextIDText {
|
||||||
get => ContextID.ToString(CultureInfo.InvariantCulture);
|
get => ContextID.ToString(CultureInfo.InvariantCulture);
|
||||||
@@ -182,16 +175,12 @@ namespace ArchiSteamFarm.Json {
|
|||||||
ContextID = contextID;
|
ContextID = contextID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#pragma warning restore IDE0051
|
|
||||||
|
|
||||||
#pragma warning disable IDE0051
|
|
||||||
[JsonProperty(PropertyName = "id", Required = Required.DisallowNull)]
|
[JsonProperty(PropertyName = "id", Required = Required.DisallowNull)]
|
||||||
private string IDText {
|
private string IDText {
|
||||||
set => AssetIDText = value;
|
set => AssetIDText = value;
|
||||||
}
|
}
|
||||||
#pragma warning restore IDE0051
|
|
||||||
|
|
||||||
#pragma warning disable IDE0051
|
|
||||||
[JsonProperty(PropertyName = "instanceid", Required = Required.DisallowNull)]
|
[JsonProperty(PropertyName = "instanceid", Required = Required.DisallowNull)]
|
||||||
private string InstanceIDText {
|
private string InstanceIDText {
|
||||||
set {
|
set {
|
||||||
@@ -208,7 +197,6 @@ namespace ArchiSteamFarm.Json {
|
|||||||
InstanceID = instanceID;
|
InstanceID = instanceID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#pragma warning restore IDE0051
|
|
||||||
|
|
||||||
// Constructed from trades being received or plugins
|
// Constructed from trades being received or plugins
|
||||||
public Asset(uint appID, ulong contextID, ulong classID, uint amount, ulong instanceID = 0, ulong assetID = 0, bool marketable = true, bool tradable = true, ImmutableHashSet<Tag>? tags = null, uint realAppID = 0, EType type = EType.Unknown, ERarity rarity = ERarity.Unknown) {
|
public Asset(uint appID, ulong contextID, ulong classID, uint amount, ulong instanceID = 0, ulong assetID = 0, bool marketable = true, bool tradable = true, ImmutableHashSet<Tag>? tags = null, uint realAppID = 0, EType type = EType.Unknown, ERarity rarity = ERarity.Unknown) {
|
||||||
@@ -380,7 +368,6 @@ namespace ArchiSteamFarm.Json {
|
|||||||
internal ulong LastAssetID { get; private set; }
|
internal ulong LastAssetID { get; private set; }
|
||||||
internal bool MoreItems { get; private set; }
|
internal bool MoreItems { get; private set; }
|
||||||
|
|
||||||
#pragma warning disable IDE0051
|
|
||||||
[JsonProperty(PropertyName = "last_assetid", Required = Required.DisallowNull)]
|
[JsonProperty(PropertyName = "last_assetid", Required = Required.DisallowNull)]
|
||||||
private string LastAssetIDText {
|
private string LastAssetIDText {
|
||||||
set {
|
set {
|
||||||
@@ -399,14 +386,11 @@ namespace ArchiSteamFarm.Json {
|
|||||||
LastAssetID = lastAssetID;
|
LastAssetID = lastAssetID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#pragma warning restore IDE0051
|
|
||||||
|
|
||||||
#pragma warning disable IDE0051
|
|
||||||
[JsonProperty(PropertyName = "more_items", Required = Required.DisallowNull)]
|
[JsonProperty(PropertyName = "more_items", Required = Required.DisallowNull)]
|
||||||
private byte MoreItemsNumber {
|
private byte MoreItemsNumber {
|
||||||
set => MoreItems = value > 0;
|
set => MoreItems = value > 0;
|
||||||
}
|
}
|
||||||
#pragma warning restore IDE0051
|
|
||||||
|
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
private InventoryResponse() { }
|
private InventoryResponse() { }
|
||||||
@@ -546,7 +530,6 @@ namespace ArchiSteamFarm.Json {
|
|||||||
|
|
||||||
internal bool Tradable { get; set; }
|
internal bool Tradable { get; set; }
|
||||||
|
|
||||||
#pragma warning disable IDE0051
|
|
||||||
[JsonProperty(PropertyName = "classid", Required = Required.Always)]
|
[JsonProperty(PropertyName = "classid", Required = Required.Always)]
|
||||||
private string ClassIDText {
|
private string ClassIDText {
|
||||||
set {
|
set {
|
||||||
@@ -565,9 +548,7 @@ namespace ArchiSteamFarm.Json {
|
|||||||
ClassID = classID;
|
ClassID = classID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#pragma warning restore IDE0051
|
|
||||||
|
|
||||||
#pragma warning disable IDE0051
|
|
||||||
[JsonProperty(PropertyName = "instanceid", Required = Required.DisallowNull)]
|
[JsonProperty(PropertyName = "instanceid", Required = Required.DisallowNull)]
|
||||||
private string InstanceIDText {
|
private string InstanceIDText {
|
||||||
set {
|
set {
|
||||||
@@ -584,21 +565,16 @@ namespace ArchiSteamFarm.Json {
|
|||||||
InstanceID = instanceID;
|
InstanceID = instanceID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#pragma warning restore IDE0051
|
|
||||||
|
|
||||||
#pragma warning disable IDE0051
|
|
||||||
[JsonProperty(PropertyName = "marketable", Required = Required.Always)]
|
[JsonProperty(PropertyName = "marketable", Required = Required.Always)]
|
||||||
private byte MarketableNumber {
|
private byte MarketableNumber {
|
||||||
set => Marketable = value > 0;
|
set => Marketable = value > 0;
|
||||||
}
|
}
|
||||||
#pragma warning restore IDE0051
|
|
||||||
|
|
||||||
#pragma warning disable IDE0051
|
|
||||||
[JsonProperty(PropertyName = "tradable", Required = Required.Always)]
|
[JsonProperty(PropertyName = "tradable", Required = Required.Always)]
|
||||||
private byte TradableNumber {
|
private byte TradableNumber {
|
||||||
set => Tradable = value > 0;
|
set => Tradable = value > 0;
|
||||||
}
|
}
|
||||||
#pragma warning restore IDE0051
|
|
||||||
|
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
internal Description() { }
|
internal Description() { }
|
||||||
@@ -655,7 +631,6 @@ namespace ArchiSteamFarm.Json {
|
|||||||
|
|
||||||
internal ulong TradeOfferID { get; private set; }
|
internal ulong TradeOfferID { get; private set; }
|
||||||
|
|
||||||
#pragma warning disable IDE0051
|
|
||||||
[JsonProperty(PropertyName = "tradeofferid", Required = Required.Always)]
|
[JsonProperty(PropertyName = "tradeofferid", Required = Required.Always)]
|
||||||
private string TradeOfferIDText {
|
private string TradeOfferIDText {
|
||||||
set {
|
set {
|
||||||
@@ -674,7 +649,6 @@ namespace ArchiSteamFarm.Json {
|
|||||||
TradeOfferID = tradeOfferID;
|
TradeOfferID = tradeOfferID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#pragma warning restore IDE0051
|
|
||||||
|
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
private TradeOfferSendResponse() { }
|
private TradeOfferSendResponse() { }
|
||||||
|
|||||||
@@ -55,15 +55,11 @@ namespace ArchiSteamFarm {
|
|||||||
|
|
||||||
private readonly ArchiCacheable<string> CachedDeviceID;
|
private readonly ArchiCacheable<string> CachedDeviceID;
|
||||||
|
|
||||||
#pragma warning disable 649
|
|
||||||
[JsonProperty(PropertyName = "identity_secret", Required = Required.Always)]
|
[JsonProperty(PropertyName = "identity_secret", Required = Required.Always)]
|
||||||
private readonly string IdentitySecret = "";
|
private readonly string IdentitySecret = "";
|
||||||
#pragma warning restore 649
|
|
||||||
|
|
||||||
#pragma warning disable 649
|
|
||||||
[JsonProperty(PropertyName = "shared_secret", Required = Required.Always)]
|
[JsonProperty(PropertyName = "shared_secret", Required = Required.Always)]
|
||||||
private readonly string SharedSecret = "";
|
private readonly string SharedSecret = "";
|
||||||
#pragma warning restore 649
|
|
||||||
|
|
||||||
private Bot? Bot;
|
private Bot? Bot;
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ namespace ArchiSteamFarm {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning disable 1998
|
#pragma warning disable CS1998
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public static class File {
|
public static class File {
|
||||||
public static async Task AppendAllTextAsync(string path, string contents) =>
|
public static async Task AppendAllTextAsync(string path, string contents) =>
|
||||||
@@ -70,7 +70,6 @@ namespace ArchiSteamFarm {
|
|||||||
await System.IO.File.AppendAllTextAsync(path, contents).ConfigureAwait(false);
|
await System.IO.File.AppendAllTextAsync(path, contents).ConfigureAwait(false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#pragma warning disable IDE0022
|
|
||||||
public static void Move(string sourceFileName, string destFileName, bool overwrite) {
|
public static void Move(string sourceFileName, string destFileName, bool overwrite) {
|
||||||
#if NETFRAMEWORK
|
#if NETFRAMEWORK
|
||||||
if (overwrite && System.IO.File.Exists(destFileName)) {
|
if (overwrite && System.IO.File.Exists(destFileName)) {
|
||||||
@@ -82,7 +81,6 @@ namespace ArchiSteamFarm {
|
|||||||
System.IO.File.Move(sourceFileName, destFileName, overwrite);
|
System.IO.File.Move(sourceFileName, destFileName, overwrite);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#pragma warning restore IDE0022
|
|
||||||
|
|
||||||
public static async Task<byte[]> ReadAllBytesAsync(string path) =>
|
public static async Task<byte[]> ReadAllBytesAsync(string path) =>
|
||||||
#if NETFRAMEWORK
|
#if NETFRAMEWORK
|
||||||
@@ -105,7 +103,7 @@ namespace ArchiSteamFarm {
|
|||||||
await System.IO.File.WriteAllTextAsync(path, contents).ConfigureAwait(false);
|
await System.IO.File.WriteAllTextAsync(path, contents).ConfigureAwait(false);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#pragma warning restore 1998
|
#pragma warning restore CS1998
|
||||||
|
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public static class HashCode {
|
public static class HashCode {
|
||||||
@@ -129,9 +127,7 @@ namespace ArchiSteamFarm {
|
|||||||
|
|
||||||
return (result[0] == System.IO.Path.DirectorySeparatorChar) || (result[0] == System.IO.Path.AltDirectorySeparatorChar) ? result[1..] : result;
|
return (result[0] == System.IO.Path.DirectorySeparatorChar) || (result[0] == System.IO.Path.AltDirectorySeparatorChar) ? result[1..] : result;
|
||||||
#else
|
#else
|
||||||
#pragma warning disable IDE0022
|
|
||||||
return System.IO.Path.GetRelativePath(relativeTo, path);
|
return System.IO.Path.GetRelativePath(relativeTo, path);
|
||||||
#pragma warning restore IDE0022
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -702,33 +702,30 @@ namespace ArchiSteamFarm {
|
|||||||
|
|
||||||
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
|
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
|
||||||
private sealed class ListedUser {
|
private sealed class ListedUser {
|
||||||
#pragma warning disable 649
|
#pragma warning disable CS0649
|
||||||
[JsonProperty(PropertyName = "items_count", Required = Required.Always)]
|
[JsonProperty(PropertyName = "items_count", Required = Required.Always)]
|
||||||
internal readonly ushort ItemsCount;
|
internal readonly ushort ItemsCount;
|
||||||
#pragma warning restore 649
|
#pragma warning restore CS0649
|
||||||
|
|
||||||
internal readonly HashSet<Steam.Asset.EType> MatchableTypes = new();
|
internal readonly HashSet<Steam.Asset.EType> MatchableTypes = new();
|
||||||
|
|
||||||
#pragma warning disable 649
|
#pragma warning disable CS0649
|
||||||
[JsonProperty(PropertyName = "steam_id", Required = Required.Always)]
|
[JsonProperty(PropertyName = "steam_id", Required = Required.Always)]
|
||||||
internal readonly ulong SteamID;
|
internal readonly ulong SteamID;
|
||||||
#pragma warning restore 649
|
#pragma warning restore CS0649
|
||||||
|
|
||||||
#pragma warning disable 649
|
|
||||||
[JsonProperty(PropertyName = "trade_token", Required = Required.Always)]
|
[JsonProperty(PropertyName = "trade_token", Required = Required.Always)]
|
||||||
internal readonly string TradeToken = "";
|
internal readonly string TradeToken = "";
|
||||||
#pragma warning restore 649
|
|
||||||
|
|
||||||
internal float Score => GamesCount / (float) ItemsCount;
|
internal float Score => GamesCount / (float) ItemsCount;
|
||||||
|
|
||||||
#pragma warning disable 649
|
#pragma warning disable CS0649
|
||||||
[JsonProperty(PropertyName = "games_count", Required = Required.Always)]
|
[JsonProperty(PropertyName = "games_count", Required = Required.Always)]
|
||||||
private readonly ushort GamesCount;
|
private readonly ushort GamesCount;
|
||||||
#pragma warning restore 649
|
#pragma warning restore CS0649
|
||||||
|
|
||||||
internal bool MatchEverything { get; private set; }
|
internal bool MatchEverything { get; private set; }
|
||||||
|
|
||||||
#pragma warning disable IDE0051
|
|
||||||
[JsonProperty(PropertyName = "matchable_backgrounds", Required = Required.Always)]
|
[JsonProperty(PropertyName = "matchable_backgrounds", Required = Required.Always)]
|
||||||
private byte MatchableBackgroundsNumber {
|
private byte MatchableBackgroundsNumber {
|
||||||
set {
|
set {
|
||||||
@@ -748,9 +745,7 @@ namespace ArchiSteamFarm {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#pragma warning restore IDE0051
|
|
||||||
|
|
||||||
#pragma warning disable IDE0051
|
|
||||||
[JsonProperty(PropertyName = "matchable_cards", Required = Required.Always)]
|
[JsonProperty(PropertyName = "matchable_cards", Required = Required.Always)]
|
||||||
private byte MatchableCardsNumber {
|
private byte MatchableCardsNumber {
|
||||||
set {
|
set {
|
||||||
@@ -770,9 +765,7 @@ namespace ArchiSteamFarm {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#pragma warning restore IDE0051
|
|
||||||
|
|
||||||
#pragma warning disable IDE0051
|
|
||||||
[JsonProperty(PropertyName = "matchable_emoticons", Required = Required.Always)]
|
[JsonProperty(PropertyName = "matchable_emoticons", Required = Required.Always)]
|
||||||
private byte MatchableEmoticonsNumber {
|
private byte MatchableEmoticonsNumber {
|
||||||
set {
|
set {
|
||||||
@@ -792,9 +785,7 @@ namespace ArchiSteamFarm {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#pragma warning restore IDE0051
|
|
||||||
|
|
||||||
#pragma warning disable IDE0051
|
|
||||||
[JsonProperty(PropertyName = "matchable_foil_cards", Required = Required.Always)]
|
[JsonProperty(PropertyName = "matchable_foil_cards", Required = Required.Always)]
|
||||||
private byte MatchableFoilCardsNumber {
|
private byte MatchableFoilCardsNumber {
|
||||||
set {
|
set {
|
||||||
@@ -814,9 +805,7 @@ namespace ArchiSteamFarm {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#pragma warning restore IDE0051
|
|
||||||
|
|
||||||
#pragma warning disable IDE0051
|
|
||||||
[JsonProperty(PropertyName = "match_everything", Required = Required.Always)]
|
[JsonProperty(PropertyName = "match_everything", Required = Required.Always)]
|
||||||
private byte MatchEverythingNumber {
|
private byte MatchEverythingNumber {
|
||||||
set {
|
set {
|
||||||
@@ -836,7 +825,6 @@ namespace ArchiSteamFarm {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#pragma warning restore IDE0051
|
|
||||||
|
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
private ListedUser() { }
|
private ListedUser() { }
|
||||||
|
|||||||
Reference in New Issue
Block a user