mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-18 15:30:30 +00:00
Add json constructor attributes
This commit is contained in:
@@ -58,6 +58,7 @@ namespace ArchiSteamFarm.CustomPlugins.ExamplePlugin {
|
|||||||
internal readonly string Link;
|
internal readonly string Link;
|
||||||
#pragma warning restore 649
|
#pragma warning restore 649
|
||||||
|
|
||||||
|
[JsonConstructor]
|
||||||
private MeowResponse() { }
|
private MeowResponse() { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ namespace ArchiSteamFarm {
|
|||||||
private string _ChangelogHTML;
|
private string _ChangelogHTML;
|
||||||
private string _ChangelogPlainText;
|
private string _ChangelogPlainText;
|
||||||
|
|
||||||
// Deserialized from JSON
|
[JsonConstructor]
|
||||||
private ReleaseResponse() { }
|
private ReleaseResponse() { }
|
||||||
|
|
||||||
internal sealed class Asset {
|
internal sealed class Asset {
|
||||||
@@ -210,7 +210,7 @@ namespace ArchiSteamFarm {
|
|||||||
[JsonProperty(PropertyName = "size", Required = Required.Always)]
|
[JsonProperty(PropertyName = "size", Required = Required.Always)]
|
||||||
internal readonly uint Size;
|
internal readonly uint Size;
|
||||||
|
|
||||||
// Deserialized from JSON
|
[JsonConstructor]
|
||||||
private Asset() { }
|
private Asset() { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace ArchiSteamFarm.IPC.Requests {
|
|||||||
[Required]
|
[Required]
|
||||||
public readonly GlobalConfig GlobalConfig;
|
public readonly GlobalConfig GlobalConfig;
|
||||||
|
|
||||||
// Deserialized from JSON
|
[JsonConstructor]
|
||||||
private ASFRequest() { }
|
private ASFRequest() { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ namespace ArchiSteamFarm.IPC.Requests {
|
|||||||
[Required]
|
[Required]
|
||||||
public readonly OrderedDictionary GamesToRedeemInBackground;
|
public readonly OrderedDictionary GamesToRedeemInBackground;
|
||||||
|
|
||||||
// Deserialized from JSON
|
[JsonConstructor]
|
||||||
private BotGamesToRedeemInBackgroundRequest() { }
|
private BotGamesToRedeemInBackgroundRequest() { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ namespace ArchiSteamFarm.IPC.Requests {
|
|||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public readonly ushort ResumeInSeconds;
|
public readonly ushort ResumeInSeconds;
|
||||||
|
|
||||||
// Deserialized from JSON
|
[JsonConstructor]
|
||||||
private BotPauseRequest() { }
|
private BotPauseRequest() { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ namespace ArchiSteamFarm.IPC.Requests {
|
|||||||
[Required]
|
[Required]
|
||||||
public readonly ImmutableHashSet<string> KeysToRedeem;
|
public readonly ImmutableHashSet<string> KeysToRedeem;
|
||||||
|
|
||||||
// Deserialized from JSON
|
[JsonConstructor]
|
||||||
private BotRedeemRequest() { }
|
private BotRedeemRequest() { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace ArchiSteamFarm.IPC.Requests {
|
|||||||
[Required]
|
[Required]
|
||||||
public readonly BotConfig BotConfig;
|
public readonly BotConfig BotConfig;
|
||||||
|
|
||||||
// Deserialized from JSON
|
[JsonConstructor]
|
||||||
private BotRequest() { }
|
private BotRequest() { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ namespace ArchiSteamFarm.IPC.Requests {
|
|||||||
[JsonProperty(Required = Required.Always)]
|
[JsonProperty(Required = Required.Always)]
|
||||||
public readonly string URL;
|
public readonly string URL;
|
||||||
|
|
||||||
// Deserialized from JSON
|
[JsonConstructor]
|
||||||
private WWWSendRequest() { }
|
private WWWSendRequest() { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ namespace ArchiSteamFarm.Json {
|
|||||||
Type = type;
|
Type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deserialized from JSON
|
[JsonConstructor]
|
||||||
private Asset() { }
|
private Asset() { }
|
||||||
|
|
||||||
public enum EType : byte {
|
public enum EType : byte {
|
||||||
@@ -189,7 +189,7 @@ namespace ArchiSteamFarm.Json {
|
|||||||
[JsonProperty(PropertyName = "success", Required = Required.Always)]
|
[JsonProperty(PropertyName = "success", Required = Required.Always)]
|
||||||
public readonly bool Success;
|
public readonly bool Success;
|
||||||
|
|
||||||
// Deserialized from JSON
|
[JsonConstructor]
|
||||||
protected BooleanResponse() { }
|
protected BooleanResponse() { }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -269,7 +269,7 @@ namespace ArchiSteamFarm.Json {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deserialized from JSON
|
[JsonConstructor]
|
||||||
private ConfirmationDetails() { }
|
private ConfirmationDetails() { }
|
||||||
|
|
||||||
// REF: Internal documentation
|
// REF: Internal documentation
|
||||||
@@ -290,7 +290,7 @@ namespace ArchiSteamFarm.Json {
|
|||||||
[JsonProperty(PropertyName = "success", Required = Required.Always)]
|
[JsonProperty(PropertyName = "success", Required = Required.Always)]
|
||||||
public readonly EResult Result;
|
public readonly EResult Result;
|
||||||
|
|
||||||
// Deserialized from JSON
|
[JsonConstructor]
|
||||||
protected EResultResponse() { }
|
protected EResultResponse() { }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -319,7 +319,7 @@ namespace ArchiSteamFarm.Json {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deserialized from JSON
|
[JsonConstructor]
|
||||||
protected NumberResponse() { }
|
protected NumberResponse() { }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -422,7 +422,7 @@ namespace ArchiSteamFarm.Json {
|
|||||||
set => MoreItems = value > 0;
|
set => MoreItems = value > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deserialized from JSON
|
[JsonConstructor]
|
||||||
private InventoryResponse() { }
|
private InventoryResponse() { }
|
||||||
|
|
||||||
internal sealed class Description {
|
internal sealed class Description {
|
||||||
@@ -462,7 +462,7 @@ namespace ArchiSteamFarm.Json {
|
|||||||
set => Tradable = value > 0;
|
set => Tradable = value > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deserialized from JSON
|
[JsonConstructor]
|
||||||
private Description() { }
|
private Description() { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -472,7 +472,7 @@ namespace ArchiSteamFarm.Json {
|
|||||||
[JsonProperty(PropertyName = "queue", Required = Required.Always)]
|
[JsonProperty(PropertyName = "queue", Required = Required.Always)]
|
||||||
internal readonly HashSet<uint> Queue;
|
internal readonly HashSet<uint> Queue;
|
||||||
|
|
||||||
// Deserialized from JSON
|
[JsonConstructor]
|
||||||
private NewDiscoveryQueueResponse() { }
|
private NewDiscoveryQueueResponse() { }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -487,14 +487,14 @@ namespace ArchiSteamFarm.Json {
|
|||||||
[JsonProperty(PropertyName = "currency", Required = Required.DisallowNull)]
|
[JsonProperty(PropertyName = "currency", Required = Required.DisallowNull)]
|
||||||
internal readonly ECurrencyCode? WalletCurrencyCode;
|
internal readonly ECurrencyCode? WalletCurrencyCode;
|
||||||
|
|
||||||
// Deserialized from JSON
|
[JsonConstructor]
|
||||||
private RedeemWalletResponse() { }
|
private RedeemWalletResponse() { }
|
||||||
|
|
||||||
internal sealed class InternalKeyDetails {
|
internal sealed class InternalKeyDetails {
|
||||||
[JsonProperty(PropertyName = "currencycode", Required = Required.Always)]
|
[JsonProperty(PropertyName = "currencycode", Required = Required.Always)]
|
||||||
internal readonly ECurrencyCode CurrencyCode;
|
internal readonly ECurrencyCode CurrencyCode;
|
||||||
|
|
||||||
// Deserialized from JSON
|
[JsonConstructor]
|
||||||
private InternalKeyDetails() { }
|
private InternalKeyDetails() { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -504,7 +504,7 @@ namespace ArchiSteamFarm.Json {
|
|||||||
[JsonProperty(PropertyName = "needs_mobile_confirmation", Required = Required.DisallowNull)]
|
[JsonProperty(PropertyName = "needs_mobile_confirmation", Required = Required.DisallowNull)]
|
||||||
internal readonly bool RequiresMobileConfirmation;
|
internal readonly bool RequiresMobileConfirmation;
|
||||||
|
|
||||||
// Deserialized from JSON
|
[JsonConstructor]
|
||||||
private TradeOfferAcceptResponse() { }
|
private TradeOfferAcceptResponse() { }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -547,7 +547,7 @@ namespace ArchiSteamFarm.Json {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deserialized from JSON
|
[JsonConstructor]
|
||||||
private TradeOfferSendResponse() { }
|
private TradeOfferSendResponse() { }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -565,7 +565,7 @@ namespace ArchiSteamFarm.Json {
|
|||||||
CommentPermission = commentPermission;
|
CommentPermission = commentPermission;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deserialized from JSON
|
[JsonConstructor]
|
||||||
private UserPrivacy() { }
|
private UserPrivacy() { }
|
||||||
|
|
||||||
internal sealed class PrivacySettings {
|
internal sealed class PrivacySettings {
|
||||||
@@ -601,7 +601,7 @@ namespace ArchiSteamFarm.Json {
|
|||||||
InventoryGifts = inventoryGifts;
|
InventoryGifts = inventoryGifts;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deserialized from JSON
|
[JsonConstructor]
|
||||||
private PrivacySettings() { }
|
private PrivacySettings() { }
|
||||||
|
|
||||||
internal enum EPrivacySetting : byte {
|
internal enum EPrivacySetting : byte {
|
||||||
|
|||||||
Reference in New Issue
Block a user