From f4a96c681eff3685b420bb1f64211bba3312a3bb Mon Sep 17 00:00:00 2001 From: JustArchi Date: Wed, 17 Oct 2018 20:22:55 +0200 Subject: [PATCH] R# cleanup --- ArchiSteamFarm.Tests/nuget.config | 11 +++++----- ArchiSteamFarm.sln.DotSettings | 12 +++++++++- .../IPC/Controllers/Api/ASFController.cs | 10 ++++----- .../IPC/Controllers/Api/BotController.cs | 20 ++++++++--------- .../IPC/Controllers/Api/CommandController.cs | 6 ++--- .../IPC/Controllers/Api/NLogController.cs | 4 ++-- .../Controllers/Api/StructureController.cs | 4 ++-- .../IPC/Controllers/Api/TypeController.cs | 4 ++-- .../IPC/Controllers/Api/WWWController.cs | 16 +++++++------- ArchiSteamFarm/IPC/Requests/ASFRequest.cs | 2 +- .../IPC/Requests/BotPauseRequest.cs | 4 ++-- ArchiSteamFarm/IPC/Requests/BotRequest.cs | 2 +- .../GamesToRedeemInBackgroundRequest.cs | 6 ++--- ArchiSteamFarm/IPC/Requests/WWWSendRequest.cs | 4 ++-- ArchiSteamFarm/IPC/Responses/ASFResponse.cs | 10 ++++----- .../GamesToRedeemInBackgroundResponse.cs | 4 ++-- .../IPC/Responses/GenericResponse.cs | 10 ++++----- .../IPC/Responses/GitHubReleaseResponse.cs | 8 +++---- ArchiSteamFarm/IPC/Responses/TypeResponse.cs | 22 +++++++++---------- ArchiSteamFarm/Trading.cs | 2 +- 20 files changed, 86 insertions(+), 75 deletions(-) diff --git a/ArchiSteamFarm.Tests/nuget.config b/ArchiSteamFarm.Tests/nuget.config index 1e0380dbb..ba0d4cac3 100644 --- a/ArchiSteamFarm.Tests/nuget.config +++ b/ArchiSteamFarm.Tests/nuget.config @@ -1,6 +1,7 @@ - + + - - - - + + + + \ No newline at end of file diff --git a/ArchiSteamFarm.sln.DotSettings b/ArchiSteamFarm.sln.DotSettings index 1f0b89f02..079292a6c 100644 --- a/ArchiSteamFarm.sln.DotSettings +++ b/ArchiSteamFarm.sln.DotSettings @@ -56,6 +56,7 @@ WARNING WARNING SUGGESTION + SUGGESTION SUGGESTION SUGGESTION HINT @@ -147,6 +148,7 @@ SUGGESTION SUGGESTION SUGGESTION + SUGGESTION SUGGESTION SUGGESTION @@ -197,7 +199,7 @@ False False False - False + True False True True @@ -236,6 +238,14 @@ USE_TABS_ONLY USE_TABS_ONLY USE_TABS_ONLY + Tab + True + OnSingleLine + ByFirstAttr + OnSingleLine + False + 10000 + False USE_TABS_ONLY 2 2 diff --git a/ArchiSteamFarm/IPC/Controllers/Api/ASFController.cs b/ArchiSteamFarm/IPC/Controllers/Api/ASFController.cs index 22fbc813b..502b48c59 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/ASFController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/ASFController.cs @@ -32,7 +32,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { [Route("Api/ASF")] public sealed class ASFController : ArchiController { /// - /// Fetches common info related to ASF as a whole. + /// Fetches common info related to ASF as a whole. /// [HttpGet] [ProducesResponseType(typeof(GenericResponse), 200)] @@ -50,7 +50,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { } /// - /// Updates ASF's global config. + /// Updates ASF's global config. /// [Consumes("application/json")] [HttpPost] @@ -80,7 +80,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { } /// - /// Makes ASF shutdown itself. + /// Makes ASF shutdown itself. /// [HttpPost("Exit")] [ProducesResponseType(typeof(GenericResponse), 200)] @@ -90,7 +90,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { } /// - /// Makes ASF restart itself. + /// Makes ASF restart itself. /// [HttpPost("Restart")] [ProducesResponseType(typeof(GenericResponse), 200)] @@ -100,7 +100,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { } /// - /// Makes ASF update itself. + /// Makes ASF update itself. /// [HttpPost("Update")] [ProducesResponseType(typeof(GenericResponse), 200)] diff --git a/ArchiSteamFarm/IPC/Controllers/Api/BotController.cs b/ArchiSteamFarm/IPC/Controllers/Api/BotController.cs index 0de25760e..7e6b4e9c3 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/BotController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/BotController.cs @@ -34,7 +34,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { [Route("Api/Bot")] public sealed class BotController : ArchiController { /// - /// Deletes all files related to given bots. + /// Deletes all files related to given bots. /// [HttpDelete("{botNames:required}")] [ProducesResponseType(typeof(GenericResponse), 200)] @@ -54,7 +54,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { } /// - /// Fetches common info related to given bots. + /// Fetches common info related to given bots. /// [HttpGet("{botNames:required}")] [ProducesResponseType(typeof(GenericResponse>), 200)] @@ -73,7 +73,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { } /// - /// Updates bot config of given bot. + /// Updates bot config of given bot. /// [Consumes("application/json")] [HttpPost("{botName:required}")] @@ -113,7 +113,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { } /// - /// Removes BGR output files of given bots. + /// Removes BGR output files of given bots. /// [HttpDelete("{botNames:required}/GamesToRedeemInBackground")] [ProducesResponseType(typeof(GenericResponse), 200)] @@ -133,7 +133,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { } /// - /// Fetches BGR output files of given bots. + /// Fetches BGR output files of given bots. /// [HttpGet("{botNames:required}/GamesToRedeemInBackground")] [ProducesResponseType(typeof(GenericResponse>), 200)] @@ -161,7 +161,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { } /// - /// Adds keys to redeem using BGR to given bot. + /// Adds keys to redeem using BGR to given bot. /// [Consumes("application/json")] [HttpPost("{botName:required}/GamesToRedeemInBackground")] @@ -185,7 +185,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { } /// - /// Pauses given bots. + /// Pauses given bots. /// [Consumes("application/json")] [HttpPost("{botNames:required}/Pause")] @@ -206,7 +206,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { } /// - /// Resumes given bots. + /// Resumes given bots. /// [HttpPost("{botNames:required}/Resume")] [ProducesResponseType(typeof(GenericResponse), 200)] @@ -226,7 +226,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { } /// - /// Starts given bots. + /// Starts given bots. /// [HttpPost("{botNames:required}/Start")] [ProducesResponseType(typeof(GenericResponse), 200)] @@ -246,7 +246,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { } /// - /// Stops given bots. + /// Stops given bots. /// [HttpPost("{botNames:required}/Stop")] [ProducesResponseType(typeof(GenericResponse), 200)] diff --git a/ArchiSteamFarm/IPC/Controllers/Api/CommandController.cs b/ArchiSteamFarm/IPC/Controllers/Api/CommandController.cs index d2bd32843..5d807155e 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/CommandController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/CommandController.cs @@ -30,11 +30,11 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { [Route("Api/Command")] public sealed class CommandController : ArchiController { /// - /// Executes a command. + /// Executes a command. /// /// - /// This API endpoint is supposed to be entirely replaced by ASF actions available under /Api/ASF/{action} and /Api/Bot/{bot}/{action}. - /// You should use "given bot" commands when executing this endpoint, omitting targets of the command will cause the command to be executed on first defined bot + /// This API endpoint is supposed to be entirely replaced by ASF actions available under /Api/ASF/{action} and /Api/Bot/{bot}/{action}. + /// You should use "given bot" commands when executing this endpoint, omitting targets of the command will cause the command to be executed on first defined bot /// [HttpPost("{command:required}")] [ProducesResponseType(typeof(GenericResponse), 200)] diff --git a/ArchiSteamFarm/IPC/Controllers/Api/NLogController.cs b/ArchiSteamFarm/IPC/Controllers/Api/NLogController.cs index 84bf20803..fbd7a4bfa 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/NLogController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/NLogController.cs @@ -38,10 +38,10 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { private static readonly ConcurrentDictionary ActiveLogWebSockets = new ConcurrentDictionary(); /// - /// Fetches ASF log in realtime. + /// Fetches ASF log in realtime. /// /// - /// This API endpoint requires a websocket connection. + /// This API endpoint requires a websocket connection. /// [HttpGet] [ProducesResponseType(typeof(IEnumerable>), 200)] diff --git a/ArchiSteamFarm/IPC/Controllers/Api/StructureController.cs b/ArchiSteamFarm/IPC/Controllers/Api/StructureController.cs index d8b42d0ea..35eb0a110 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/StructureController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/StructureController.cs @@ -28,10 +28,10 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { [Route("Api/Structure")] public sealed class StructureController : ArchiController { /// - /// Fetches structure of given type. + /// Fetches structure of given type. /// /// - /// Structure is defined as a representation of given object in its default state. + /// Structure is defined as a representation of given object in its default state. /// [HttpGet("{structure:required}")] [ProducesResponseType(typeof(GenericResponse), 200)] diff --git a/ArchiSteamFarm/IPC/Controllers/Api/TypeController.cs b/ArchiSteamFarm/IPC/Controllers/Api/TypeController.cs index ad0063a3b..eb5edd182 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/TypeController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/TypeController.cs @@ -32,10 +32,10 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { [Route("Api/Type")] public sealed class TypeController : ArchiController { /// - /// Fetches type info of given type. + /// Fetches type info of given type. /// /// - /// Type info is defined as a representation of given object with its fields and properties being assigned to a string value that defines their type. + /// Type info is defined as a representation of given object with its fields and properties being assigned to a string value that defines their type. /// [HttpGet("{type:required}")] [ProducesResponseType(typeof(GenericResponse), 200)] diff --git a/ArchiSteamFarm/IPC/Controllers/Api/WWWController.cs b/ArchiSteamFarm/IPC/Controllers/Api/WWWController.cs index 0a569b223..fb90fa535 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/WWWController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/WWWController.cs @@ -33,10 +33,10 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { [Route("Api/WWW")] public sealed class WWWController : ArchiController { /// - /// Fetches files in given directory relative to WWW root. + /// Fetches files in given directory relative to WWW root. /// /// - /// This is internal API being utilizied by our ASF-ui IPC frontend. You should not depend on existence of any /Api/WWW as they can disappear and change anytime. + /// This is internal API being utilizied by our ASF-ui IPC frontend. You should not depend on existence of any /Api/WWW endpoints as they can disappear and change anytime. /// [HttpGet("Directory/{directory:required}")] [ProducesResponseType(typeof(GenericResponse>), 200)] @@ -64,10 +64,10 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { } /// - /// Fetches newest GitHub releases of ASF project. + /// Fetches newest GitHub releases of ASF project. /// /// - /// This is internal API being utilizied by our ASF-ui IPC frontend. You should not depend on existence of any /Api/WWW as they can disappear and change anytime. + /// This is internal API being utilizied by our ASF-ui IPC frontend. You should not depend on existence of any /Api/WWW endpoints as they can disappear and change anytime. /// [HttpGet("GitHub/Releases")] [ProducesResponseType(typeof(GenericResponse>), 200)] @@ -86,10 +86,10 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { } /// - /// Fetches specific GitHub release of ASF project. + /// Fetches specific GitHub release of ASF project. /// /// - /// This is internal API being utilizied by our ASF-ui IPC frontend. You should not depend on existence of any /Api/WWW as they can disappear and change anytime. + /// This is internal API being utilizied by our ASF-ui IPC frontend. You should not depend on existence of any /Api/WWW endpoints as they can disappear and change anytime. /// [HttpGet("GitHub/Releases/{version:required}")] [ProducesResponseType(typeof(GenericResponse), 200)] @@ -107,10 +107,10 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { } /// - /// Sends a HTTPS request through ASF's built-in HttpClient. + /// Sends a HTTPS request through ASF's built-in HttpClient. /// /// - /// This is internal API being utilizied by our ASF-ui IPC frontend. You should not depend on existence of any /Api/WWW as they can disappear and change anytime. + /// This is internal API being utilizied by our ASF-ui IPC frontend. You should not depend on existence of any /Api/WWW endpoints as they can disappear and change anytime. /// [Consumes("application/json")] [HttpPost("Send")] diff --git a/ArchiSteamFarm/IPC/Requests/ASFRequest.cs b/ArchiSteamFarm/IPC/Requests/ASFRequest.cs index bd00e9fee..5935f19de 100644 --- a/ArchiSteamFarm/IPC/Requests/ASFRequest.cs +++ b/ArchiSteamFarm/IPC/Requests/ASFRequest.cs @@ -27,7 +27,7 @@ namespace ArchiSteamFarm.IPC.Requests { [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] public sealed class ASFRequest { /// - /// ASF's global config structure. + /// ASF's global config structure. /// [JsonProperty(Required = Required.Always)] [Required] diff --git a/ArchiSteamFarm/IPC/Requests/BotPauseRequest.cs b/ArchiSteamFarm/IPC/Requests/BotPauseRequest.cs index a7c561189..6f0d4d077 100644 --- a/ArchiSteamFarm/IPC/Requests/BotPauseRequest.cs +++ b/ArchiSteamFarm/IPC/Requests/BotPauseRequest.cs @@ -26,13 +26,13 @@ namespace ArchiSteamFarm.IPC.Requests { [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] public sealed class BotPauseRequest { /// - /// Specifies if pause is permanent or temporary (default). + /// Specifies if pause is permanent or temporary (default). /// [JsonProperty(Required = Required.DisallowNull)] public readonly bool Permanent; /// - /// Specifies automatic resume action in given seconds. Default value of 0 disables automatic resume. + /// Specifies automatic resume action in given seconds. Default value of 0 disables automatic resume. /// [JsonProperty(Required = Required.DisallowNull)] public readonly ushort ResumeInSeconds; diff --git a/ArchiSteamFarm/IPC/Requests/BotRequest.cs b/ArchiSteamFarm/IPC/Requests/BotRequest.cs index e67057fb6..ad293c6d6 100644 --- a/ArchiSteamFarm/IPC/Requests/BotRequest.cs +++ b/ArchiSteamFarm/IPC/Requests/BotRequest.cs @@ -27,7 +27,7 @@ namespace ArchiSteamFarm.IPC.Requests { [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] public sealed class BotRequest { /// - /// ASF's bot config structure. + /// ASF's bot config structure. /// [JsonProperty(Required = Required.Always)] [Required] diff --git a/ArchiSteamFarm/IPC/Requests/GamesToRedeemInBackgroundRequest.cs b/ArchiSteamFarm/IPC/Requests/GamesToRedeemInBackgroundRequest.cs index 11bb6fffb..02e4923c6 100644 --- a/ArchiSteamFarm/IPC/Requests/GamesToRedeemInBackgroundRequest.cs +++ b/ArchiSteamFarm/IPC/Requests/GamesToRedeemInBackgroundRequest.cs @@ -28,11 +28,11 @@ namespace ArchiSteamFarm.IPC.Requests { [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] public sealed class GamesToRedeemInBackgroundRequest { /// - /// A string-string map that maps cd-key to redeem (key) to its name (value). + /// A string-string map that maps cd-key to redeem (key) to its name (value). /// /// - /// Key in the map must be a valid and unique Steam cd-key. - /// Value in the map must be a non-null and non-empty name of the key (e.g. game's name, but can be anything). + /// Key in the map must be a valid and unique Steam cd-key. + /// Value in the map must be a non-null and non-empty name of the key (e.g. game's name, but can be anything). /// [JsonProperty(Required = Required.Always)] [Required] diff --git a/ArchiSteamFarm/IPC/Requests/WWWSendRequest.cs b/ArchiSteamFarm/IPC/Requests/WWWSendRequest.cs index 1da581b43..7cf541bf3 100644 --- a/ArchiSteamFarm/IPC/Requests/WWWSendRequest.cs +++ b/ArchiSteamFarm/IPC/Requests/WWWSendRequest.cs @@ -27,10 +27,10 @@ namespace ArchiSteamFarm.IPC.Requests { [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] public sealed class WWWSendRequest { /// - /// Full URL of the request to be made. + /// Full URL of the request to be made. /// /// - /// URL must start from https:// scheme. + /// URL must start from https:// scheme. /// [Required] [JsonProperty(Required = Required.Always)] diff --git a/ArchiSteamFarm/IPC/Responses/ASFResponse.cs b/ArchiSteamFarm/IPC/Responses/ASFResponse.cs index 9ccd992bd..15b24ff8e 100644 --- a/ArchiSteamFarm/IPC/Responses/ASFResponse.cs +++ b/ArchiSteamFarm/IPC/Responses/ASFResponse.cs @@ -26,35 +26,35 @@ using Newtonsoft.Json; namespace ArchiSteamFarm.IPC.Responses { public sealed class ASFResponse { /// - /// ASF's build variant. + /// ASF's build variant. /// [JsonProperty(Required = Required.Always)] [Required] public readonly string BuildVariant; /// - /// Currently loaded ASF's global config. + /// Currently loaded ASF's global config. /// [JsonProperty(Required = Required.Always)] [Required] public readonly GlobalConfig GlobalConfig; /// - /// Current amount of managed memory being used by the process, in kilobytes. + /// Current amount of managed memory being used by the process, in kilobytes. /// [JsonProperty(Required = Required.Always)] [Required] public readonly uint MemoryUsage; /// - /// Start date of the process. + /// Start date of the process. /// [JsonProperty(Required = Required.Always)] [Required] public readonly DateTime ProcessStartTime; /// - /// ASF version of currently running binary. + /// ASF version of currently running binary. /// [JsonProperty(Required = Required.Always)] [Required] diff --git a/ArchiSteamFarm/IPC/Responses/GamesToRedeemInBackgroundResponse.cs b/ArchiSteamFarm/IPC/Responses/GamesToRedeemInBackgroundResponse.cs index 21f9cd848..7fb2f4423 100644 --- a/ArchiSteamFarm/IPC/Responses/GamesToRedeemInBackgroundResponse.cs +++ b/ArchiSteamFarm/IPC/Responses/GamesToRedeemInBackgroundResponse.cs @@ -25,13 +25,13 @@ using Newtonsoft.Json; namespace ArchiSteamFarm.IPC.Responses { public sealed class GamesToRedeemInBackgroundResponse { /// - /// Keys that were redeemed and not used during the process, if available. + /// Keys that were redeemed and not used during the process, if available. /// [JsonProperty] public readonly Dictionary UnusedKeys; /// - /// Keys that were redeemed and used during the process, if available. + /// Keys that were redeemed and used during the process, if available. /// [JsonProperty] public readonly Dictionary UsedKeys; diff --git a/ArchiSteamFarm/IPC/Responses/GenericResponse.cs b/ArchiSteamFarm/IPC/Responses/GenericResponse.cs index 8eeddf240..550dd7821 100644 --- a/ArchiSteamFarm/IPC/Responses/GenericResponse.cs +++ b/ArchiSteamFarm/IPC/Responses/GenericResponse.cs @@ -26,10 +26,10 @@ using Newtonsoft.Json; namespace ArchiSteamFarm.IPC.Responses { public sealed class GenericResponse : GenericResponse where T : class { /// - /// The actual result of the request, if available. + /// The actual result of the request, if available. /// /// - /// The type of the result depends on the API endpoint that you've called. + /// The type of the result depends on the API endpoint that you've called. /// [JsonProperty] public readonly T Result; @@ -41,16 +41,16 @@ namespace ArchiSteamFarm.IPC.Responses { public class GenericResponse { /// - /// A message that describes what happened with the request, if available. + /// A message that describes what happened with the request, if available. /// /// - /// This property will provide exact reason for majority of expected failures. + /// This property will provide exact reason for majority of expected failures. /// [JsonProperty] public readonly string Message; /// - /// Boolean type that specifies if the request has succeeded. + /// Boolean type that specifies if the request has succeeded. /// [JsonProperty(Required = Required.Always)] [Required] diff --git a/ArchiSteamFarm/IPC/Responses/GitHubReleaseResponse.cs b/ArchiSteamFarm/IPC/Responses/GitHubReleaseResponse.cs index 9f51ed5a0..bbda7178f 100644 --- a/ArchiSteamFarm/IPC/Responses/GitHubReleaseResponse.cs +++ b/ArchiSteamFarm/IPC/Responses/GitHubReleaseResponse.cs @@ -26,28 +26,28 @@ using Newtonsoft.Json; namespace ArchiSteamFarm.IPC.Responses { public sealed class GitHubReleaseResponse { /// - /// Changelog of the release rendered in HTML. + /// Changelog of the release rendered in HTML. /// [JsonProperty(Required = Required.Always)] [Required] public readonly string ChangelogHTML; /// - /// Date of the release. + /// Date of the release. /// [JsonProperty(Required = Required.Always)] [Required] public readonly DateTime ReleasedAt; /// - /// Boolean value that specifies whether the build is stable or not (pre-release). + /// Boolean value that specifies whether the build is stable or not (pre-release). /// [JsonProperty(Required = Required.Always)] [Required] public readonly bool Stable; /// - /// Version of the release. + /// Version of the release. /// [JsonProperty(Required = Required.Always)] [Required] diff --git a/ArchiSteamFarm/IPC/Responses/TypeResponse.cs b/ArchiSteamFarm/IPC/Responses/TypeResponse.cs index 4177237df..ba1563c29 100644 --- a/ArchiSteamFarm/IPC/Responses/TypeResponse.cs +++ b/ArchiSteamFarm/IPC/Responses/TypeResponse.cs @@ -27,19 +27,19 @@ using Newtonsoft.Json; namespace ArchiSteamFarm.IPC.Responses { public sealed class TypeResponse { /// - /// A string-string map representing a decomposition of given type. + /// A string-string map representing a decomposition of given type. /// /// - /// The actual structure of this field depends on the type that was requested. You can determine that type based on metadata. - /// For enums, keys are friendly names while values are underlying values of those names. - /// For objects, keys are non-private fields and properties, while values are underlying types of those. + /// The actual structure of this field depends on the type that was requested. You can determine that type based on metadata. + /// For enums, keys are friendly names while values are underlying values of those names. + /// For objects, keys are non-private fields and properties, while values are underlying types of those. /// [JsonProperty(Required = Required.Always)] [Required] public readonly Dictionary Body; /// - /// Metadata of given type. + /// Metadata of given type. /// [JsonProperty(Required = Required.Always)] [Required] @@ -56,28 +56,28 @@ namespace ArchiSteamFarm.IPC.Responses { public sealed class TypeProperties { /// - /// Base type of given type, if available. + /// Base type of given type, if available. /// /// - /// This can be used for determining how should be interpreted. + /// This can be used for determining how should be interpreted. /// [JsonProperty] public readonly string BaseType; /// - /// Custom attributes of given type, if available. + /// Custom attributes of given type, if available. /// /// - /// This can be used for determining main enum type if is . + /// This can be used for determining main enum type if is . /// [JsonProperty] public readonly HashSet CustomAttributes; /// - /// Underlying type of given type, if available. + /// Underlying type of given type, if available. /// /// - /// This can be used for determining underlying enum type if is . + /// This can be used for determining underlying enum type if is . /// [JsonProperty] public readonly string UnderlyingType; diff --git a/ArchiSteamFarm/Trading.cs b/ArchiSteamFarm/Trading.cs index c3968ab31..02aa6e32b 100644 --- a/ArchiSteamFarm/Trading.cs +++ b/ArchiSteamFarm/Trading.cs @@ -368,7 +368,7 @@ namespace ArchiSteamFarm { bool accept = IsTradeNeutralOrBetter(inventory, tradeOffer.ItemsToGive, tradeOffer.ItemsToReceive); // Even if trade is not neutral+ for us right now, it might be in the future, unless we're bot account where we assume that inventory doesn't change - return new ParseTradeResult(tradeOffer.TradeOfferID, accept ? ParseTradeResult.EResult.Accepted : (Bot.BotConfig.BotBehaviour.HasFlag(BotConfig.EBotBehaviour.RejectInvalidTrades) ? ParseTradeResult.EResult.RejectedPermanently : ParseTradeResult.EResult.RejectedTemporarily), tradeOffer.ItemsToReceive); + return new ParseTradeResult(tradeOffer.TradeOfferID, accept ? ParseTradeResult.EResult.Accepted : Bot.BotConfig.BotBehaviour.HasFlag(BotConfig.EBotBehaviour.RejectInvalidTrades) ? ParseTradeResult.EResult.RejectedPermanently : ParseTradeResult.EResult.RejectedTemporarily, tradeOffer.ItemsToReceive); } private sealed class ParseTradeResult {