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