mirror of
https://github.com/JustArchiNET/ArchiSteamFarm
synced 2024-11-10 07:04:27 +00:00
R# cleanup
This commit is contained in:
parent
50cb19e6e6
commit
f4a96c681e
20 changed files with 86 additions and 75 deletions
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
<packageSources>
|
||||
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
|
||||
</packageSources>
|
||||
</configuration>
|
|
@ -56,6 +56,7 @@
|
|||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=BadSwitchBracesIndent/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=BadSymbolSpaces/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=BuiltInTypeReferenceStyle/@EntryIndexedValue">SUGGESTION</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=BuiltInTypeReferenceStyleForMemberAccess/@EntryIndexedValue">SUGGESTION</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ClassCanBeSealed_002EGlobal/@EntryIndexedValue">SUGGESTION</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ClassCanBeSealed_002ELocal/@EntryIndexedValue">SUGGESTION</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=CommentTypo/@EntryIndexedValue">HINT</s:String>
|
||||
|
@ -147,6 +148,7 @@
|
|||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestBaseTypeForParameter/@EntryIndexedValue">SUGGESTION</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestDiscardDeclarationVarStyle/@EntryIndexedValue">SUGGESTION</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestVarOrType_005FBuiltInTypes/@EntryIndexedValue">SUGGESTION</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestVarOrType_005FDeconstructionDeclarations/@EntryIndexedValue">SUGGESTION</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestVarOrType_005FElsewhere/@EntryIndexedValue">SUGGESTION</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestVarOrType_005FSimpleTypes/@EntryIndexedValue">SUGGESTION</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SwitchStatementMissingSomeCases/@EntryIndexedValue"></s:String>
|
||||
|
@ -197,7 +199,7 @@
|
|||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_EXISTING_DECLARATION_PARENS_ARRANGEMENT/@EntryValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_EXISTING_EMBEDDED_ARRANGEMENT/@EntryValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_EXISTING_EXPR_MEMBER_ARRANGEMENT/@EntryValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_EXISTING_INITIALIZER_ARRANGEMENT/@EntryValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_EXISTING_INITIALIZER_ARRANGEMENT/@EntryValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_EXISTING_INVOCATION_PARENS_ARRANGEMENT/@EntryValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_USER_LINEBREAKS/@EntryValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/LINE_FEED_AT_FILE_END/@EntryValue">True</s:Boolean>
|
||||
|
@ -236,6 +238,14 @@
|
|||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/ResxFormatter/ALIGNMENT_TAB_FILL_STYLE/@EntryValue">USE_TABS_ONLY</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/VBFormat/ALIGNMENT_TAB_FILL_STYLE/@EntryValue">USE_TABS_ONLY</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/XmlDocFormatter/ALIGNMENT_TAB_FILL_STYLE/@EntryValue">USE_TABS_ONLY</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/XmlDocFormatter/INDENT_STYLE/@EntryValue">Tab</s:String>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/XmlDocFormatter/KeepUserLineBreaks/@EntryValue">True</s:Boolean>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/XmlDocFormatter/ProcessingInstructionAttributesFormat/@EntryValue">OnSingleLine</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/XmlDocFormatter/TagAttributeIndenting/@EntryValue">ByFirstAttr</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/XmlDocFormatter/TagAttributesFormat/@EntryValue">OnSingleLine</s:String>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/XmlDocFormatter/USE_INDENT_FROM_VS/@EntryValue">False</s:Boolean>
|
||||
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/XmlDocFormatter/WRAP_LIMIT/@EntryValue">10000</s:Int64>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/XmlDocFormatter/WRAP_LINES/@EntryValue">False</s:Boolean>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/XmlFormatter/ALIGNMENT_TAB_FILL_STYLE/@EntryValue">USE_TABS_ONLY</s:String>
|
||||
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/XmlFormatter/INDENT_SIZE/@EntryValue">2</s:Int64>
|
||||
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/XmlFormatter/TAB_WIDTH/@EntryValue">2</s:Int64>
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
|||
[Route("Api/ASF")]
|
||||
public sealed class ASFController : ArchiController {
|
||||
/// <summary>
|
||||
/// Fetches common info related to ASF as a whole.
|
||||
/// Fetches common info related to ASF as a whole.
|
||||
/// </summary>
|
||||
[HttpGet]
|
||||
[ProducesResponseType(typeof(GenericResponse<ASFResponse>), 200)]
|
||||
|
@ -50,7 +50,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates ASF's global config.
|
||||
/// Updates ASF's global config.
|
||||
/// </summary>
|
||||
[Consumes("application/json")]
|
||||
[HttpPost]
|
||||
|
@ -80,7 +80,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Makes ASF shutdown itself.
|
||||
/// Makes ASF shutdown itself.
|
||||
/// </summary>
|
||||
[HttpPost("Exit")]
|
||||
[ProducesResponseType(typeof(GenericResponse), 200)]
|
||||
|
@ -90,7 +90,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Makes ASF restart itself.
|
||||
/// Makes ASF restart itself.
|
||||
/// </summary>
|
||||
[HttpPost("Restart")]
|
||||
[ProducesResponseType(typeof(GenericResponse), 200)]
|
||||
|
@ -100,7 +100,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Makes ASF update itself.
|
||||
/// Makes ASF update itself.
|
||||
/// </summary>
|
||||
[HttpPost("Update")]
|
||||
[ProducesResponseType(typeof(GenericResponse<Version>), 200)]
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
|||
[Route("Api/Bot")]
|
||||
public sealed class BotController : ArchiController {
|
||||
/// <summary>
|
||||
/// Deletes all files related to given bots.
|
||||
/// Deletes all files related to given bots.
|
||||
/// </summary>
|
||||
[HttpDelete("{botNames:required}")]
|
||||
[ProducesResponseType(typeof(GenericResponse), 200)]
|
||||
|
@ -54,7 +54,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fetches common info related to given bots.
|
||||
/// Fetches common info related to given bots.
|
||||
/// </summary>
|
||||
[HttpGet("{botNames:required}")]
|
||||
[ProducesResponseType(typeof(GenericResponse<IReadOnlyDictionary<string, Bot>>), 200)]
|
||||
|
@ -73,7 +73,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates bot config of given bot.
|
||||
/// Updates bot config of given bot.
|
||||
/// </summary>
|
||||
[Consumes("application/json")]
|
||||
[HttpPost("{botName:required}")]
|
||||
|
@ -113,7 +113,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes BGR output files of given bots.
|
||||
/// Removes BGR output files of given bots.
|
||||
/// </summary>
|
||||
[HttpDelete("{botNames:required}/GamesToRedeemInBackground")]
|
||||
[ProducesResponseType(typeof(GenericResponse), 200)]
|
||||
|
@ -133,7 +133,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fetches BGR output files of given bots.
|
||||
/// Fetches BGR output files of given bots.
|
||||
/// </summary>
|
||||
[HttpGet("{botNames:required}/GamesToRedeemInBackground")]
|
||||
[ProducesResponseType(typeof(GenericResponse<IReadOnlyDictionary<string, GamesToRedeemInBackgroundResponse>>), 200)]
|
||||
|
@ -161,7 +161,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds keys to redeem using BGR to given bot.
|
||||
/// Adds keys to redeem using BGR to given bot.
|
||||
/// </summary>
|
||||
[Consumes("application/json")]
|
||||
[HttpPost("{botName:required}/GamesToRedeemInBackground")]
|
||||
|
@ -185,7 +185,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pauses given bots.
|
||||
/// Pauses given bots.
|
||||
/// </summary>
|
||||
[Consumes("application/json")]
|
||||
[HttpPost("{botNames:required}/Pause")]
|
||||
|
@ -206,7 +206,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Resumes given bots.
|
||||
/// Resumes given bots.
|
||||
/// </summary>
|
||||
[HttpPost("{botNames:required}/Resume")]
|
||||
[ProducesResponseType(typeof(GenericResponse), 200)]
|
||||
|
@ -226,7 +226,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Starts given bots.
|
||||
/// Starts given bots.
|
||||
/// </summary>
|
||||
[HttpPost("{botNames:required}/Start")]
|
||||
[ProducesResponseType(typeof(GenericResponse), 200)]
|
||||
|
@ -246,7 +246,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stops given bots.
|
||||
/// Stops given bots.
|
||||
/// </summary>
|
||||
[HttpPost("{botNames:required}/Stop")]
|
||||
[ProducesResponseType(typeof(GenericResponse), 200)]
|
||||
|
|
|
@ -30,11 +30,11 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
|||
[Route("Api/Command")]
|
||||
public sealed class CommandController : ArchiController {
|
||||
/// <summary>
|
||||
/// Executes a command.
|
||||
/// Executes a command.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 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
|
||||
/// </remarks>
|
||||
[HttpPost("{command:required}")]
|
||||
[ProducesResponseType(typeof(GenericResponse<string>), 200)]
|
||||
|
|
|
@ -38,10 +38,10 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
|||
private static readonly ConcurrentDictionary<WebSocket, SemaphoreSlim> ActiveLogWebSockets = new ConcurrentDictionary<WebSocket, SemaphoreSlim>();
|
||||
|
||||
/// <summary>
|
||||
/// Fetches ASF log in realtime.
|
||||
/// Fetches ASF log in realtime.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This API endpoint requires a websocket connection.
|
||||
/// This API endpoint requires a websocket connection.
|
||||
/// </remarks>
|
||||
[HttpGet]
|
||||
[ProducesResponseType(typeof(IEnumerable<GenericResponse<string>>), 200)]
|
||||
|
|
|
@ -28,10 +28,10 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
|||
[Route("Api/Structure")]
|
||||
public sealed class StructureController : ArchiController {
|
||||
/// <summary>
|
||||
/// Fetches structure of given type.
|
||||
/// Fetches structure of given type.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 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.
|
||||
/// </remarks>
|
||||
[HttpGet("{structure:required}")]
|
||||
[ProducesResponseType(typeof(GenericResponse<object>), 200)]
|
||||
|
|
|
@ -32,10 +32,10 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
|||
[Route("Api/Type")]
|
||||
public sealed class TypeController : ArchiController {
|
||||
/// <summary>
|
||||
/// Fetches type info of given type.
|
||||
/// Fetches type info of given type.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 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.
|
||||
/// </remarks>
|
||||
[HttpGet("{type:required}")]
|
||||
[ProducesResponseType(typeof(GenericResponse<TypeResponse>), 200)]
|
||||
|
|
|
@ -33,10 +33,10 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
|||
[Route("Api/WWW")]
|
||||
public sealed class WWWController : ArchiController {
|
||||
/// <summary>
|
||||
/// Fetches files in given directory relative to WWW root.
|
||||
/// Fetches files in given directory relative to WWW root.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 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.
|
||||
/// </remarks>
|
||||
[HttpGet("Directory/{directory:required}")]
|
||||
[ProducesResponseType(typeof(GenericResponse<IReadOnlyCollection<string>>), 200)]
|
||||
|
@ -64,10 +64,10 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fetches newest GitHub releases of ASF project.
|
||||
/// Fetches newest GitHub releases of ASF project.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 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.
|
||||
/// </remarks>
|
||||
[HttpGet("GitHub/Releases")]
|
||||
[ProducesResponseType(typeof(GenericResponse<IReadOnlyCollection<GitHubReleaseResponse>>), 200)]
|
||||
|
@ -86,10 +86,10 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fetches specific GitHub release of ASF project.
|
||||
/// Fetches specific GitHub release of ASF project.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 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.
|
||||
/// </remarks>
|
||||
[HttpGet("GitHub/Releases/{version:required}")]
|
||||
[ProducesResponseType(typeof(GenericResponse<GitHubReleaseResponse>), 200)]
|
||||
|
@ -107,10 +107,10 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a HTTPS request through ASF's built-in HttpClient.
|
||||
/// Sends a HTTPS request through ASF's built-in HttpClient.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 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.
|
||||
/// </remarks>
|
||||
[Consumes("application/json")]
|
||||
[HttpPost("Send")]
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace ArchiSteamFarm.IPC.Requests {
|
|||
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
|
||||
public sealed class ASFRequest {
|
||||
/// <summary>
|
||||
/// ASF's global config structure.
|
||||
/// ASF's global config structure.
|
||||
/// </summary>
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
[Required]
|
||||
|
|
|
@ -26,13 +26,13 @@ namespace ArchiSteamFarm.IPC.Requests {
|
|||
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
|
||||
public sealed class BotPauseRequest {
|
||||
/// <summary>
|
||||
/// Specifies if pause is permanent or temporary (default).
|
||||
/// Specifies if pause is permanent or temporary (default).
|
||||
/// </summary>
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public readonly bool Permanent;
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public readonly ushort ResumeInSeconds;
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace ArchiSteamFarm.IPC.Requests {
|
|||
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
|
||||
public sealed class BotRequest {
|
||||
/// <summary>
|
||||
/// ASF's bot config structure.
|
||||
/// ASF's bot config structure.
|
||||
/// </summary>
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
[Required]
|
||||
|
|
|
@ -28,11 +28,11 @@ namespace ArchiSteamFarm.IPC.Requests {
|
|||
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
|
||||
public sealed class GamesToRedeemInBackgroundRequest {
|
||||
/// <summary>
|
||||
/// 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).
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 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).
|
||||
/// </remarks>
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
[Required]
|
||||
|
|
|
@ -27,10 +27,10 @@ namespace ArchiSteamFarm.IPC.Requests {
|
|||
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
|
||||
public sealed class WWWSendRequest {
|
||||
/// <summary>
|
||||
/// Full URL of the request to be made.
|
||||
/// Full URL of the request to be made.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// URL must start from https:// scheme.
|
||||
/// URL must start from https:// scheme.
|
||||
/// </remarks>
|
||||
[Required]
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
|
|
|
@ -26,35 +26,35 @@ using Newtonsoft.Json;
|
|||
namespace ArchiSteamFarm.IPC.Responses {
|
||||
public sealed class ASFResponse {
|
||||
/// <summary>
|
||||
/// ASF's build variant.
|
||||
/// ASF's build variant.
|
||||
/// </summary>
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
[Required]
|
||||
public readonly string BuildVariant;
|
||||
|
||||
/// <summary>
|
||||
/// Currently loaded ASF's global config.
|
||||
/// Currently loaded ASF's global config.
|
||||
/// </summary>
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
[Required]
|
||||
public readonly GlobalConfig GlobalConfig;
|
||||
|
||||
/// <summary>
|
||||
/// Current amount of managed memory being used by the process, in kilobytes.
|
||||
/// Current amount of managed memory being used by the process, in kilobytes.
|
||||
/// </summary>
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
[Required]
|
||||
public readonly uint MemoryUsage;
|
||||
|
||||
/// <summary>
|
||||
/// Start date of the process.
|
||||
/// Start date of the process.
|
||||
/// </summary>
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
[Required]
|
||||
public readonly DateTime ProcessStartTime;
|
||||
|
||||
/// <summary>
|
||||
/// ASF version of currently running binary.
|
||||
/// ASF version of currently running binary.
|
||||
/// </summary>
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
[Required]
|
||||
|
|
|
@ -25,13 +25,13 @@ using Newtonsoft.Json;
|
|||
namespace ArchiSteamFarm.IPC.Responses {
|
||||
public sealed class GamesToRedeemInBackgroundResponse {
|
||||
/// <summary>
|
||||
/// Keys that were redeemed and not used during the process, if available.
|
||||
/// Keys that were redeemed and not used during the process, if available.
|
||||
/// </summary>
|
||||
[JsonProperty]
|
||||
public readonly Dictionary<string, string> UnusedKeys;
|
||||
|
||||
/// <summary>
|
||||
/// Keys that were redeemed and used during the process, if available.
|
||||
/// Keys that were redeemed and used during the process, if available.
|
||||
/// </summary>
|
||||
[JsonProperty]
|
||||
public readonly Dictionary<string, string> UsedKeys;
|
||||
|
|
|
@ -26,10 +26,10 @@ using Newtonsoft.Json;
|
|||
namespace ArchiSteamFarm.IPC.Responses {
|
||||
public sealed class GenericResponse<T> : GenericResponse where T : class {
|
||||
/// <summary>
|
||||
/// The actual result of the request, if available.
|
||||
/// The actual result of the request, if available.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 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.
|
||||
/// </remarks>
|
||||
[JsonProperty]
|
||||
public readonly T Result;
|
||||
|
@ -41,16 +41,16 @@ namespace ArchiSteamFarm.IPC.Responses {
|
|||
|
||||
public class GenericResponse {
|
||||
/// <summary>
|
||||
/// A message that describes what happened with the request, if available.
|
||||
/// A message that describes what happened with the request, if available.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This property will provide exact reason for majority of expected failures.
|
||||
/// This property will provide exact reason for majority of expected failures.
|
||||
/// </remarks>
|
||||
[JsonProperty]
|
||||
public readonly string Message;
|
||||
|
||||
/// <summary>
|
||||
/// Boolean type that specifies if the request has succeeded.
|
||||
/// Boolean type that specifies if the request has succeeded.
|
||||
/// </summary>
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
[Required]
|
||||
|
|
|
@ -26,28 +26,28 @@ using Newtonsoft.Json;
|
|||
namespace ArchiSteamFarm.IPC.Responses {
|
||||
public sealed class GitHubReleaseResponse {
|
||||
/// <summary>
|
||||
/// Changelog of the release rendered in HTML.
|
||||
/// Changelog of the release rendered in HTML.
|
||||
/// </summary>
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
[Required]
|
||||
public readonly string ChangelogHTML;
|
||||
|
||||
/// <summary>
|
||||
/// Date of the release.
|
||||
/// Date of the release.
|
||||
/// </summary>
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
[Required]
|
||||
public readonly DateTime ReleasedAt;
|
||||
|
||||
/// <summary>
|
||||
/// 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).
|
||||
/// </summary>
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
[Required]
|
||||
public readonly bool Stable;
|
||||
|
||||
/// <summary>
|
||||
/// Version of the release.
|
||||
/// Version of the release.
|
||||
/// </summary>
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
[Required]
|
||||
|
|
|
@ -27,19 +27,19 @@ using Newtonsoft.Json;
|
|||
namespace ArchiSteamFarm.IPC.Responses {
|
||||
public sealed class TypeResponse {
|
||||
/// <summary>
|
||||
/// A string-string map representing a decomposition of given type.
|
||||
/// A string-string map representing a decomposition of given type.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The actual structure of this field depends on the type that was requested. You can determine that type based on <see cref="Properties"/> 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 <see cref="Properties" /> 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.
|
||||
/// </remarks>
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
[Required]
|
||||
public readonly Dictionary<string, string> Body;
|
||||
|
||||
/// <summary>
|
||||
/// Metadata of given type.
|
||||
/// Metadata of given type.
|
||||
/// </summary>
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
[Required]
|
||||
|
@ -56,28 +56,28 @@ namespace ArchiSteamFarm.IPC.Responses {
|
|||
|
||||
public sealed class TypeProperties {
|
||||
/// <summary>
|
||||
/// Base type of given type, if available.
|
||||
/// Base type of given type, if available.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This can be used for determining how <see cref="Body"/> should be interpreted.
|
||||
/// This can be used for determining how <see cref="Body" /> should be interpreted.
|
||||
/// </remarks>
|
||||
[JsonProperty]
|
||||
public readonly string BaseType;
|
||||
|
||||
/// <summary>
|
||||
/// Custom attributes of given type, if available.
|
||||
/// Custom attributes of given type, if available.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This can be used for determining main enum type if <see cref="BaseType"/> is <see cref="Enum"/>.
|
||||
/// This can be used for determining main enum type if <see cref="BaseType" /> is <see cref="Enum" />.
|
||||
/// </remarks>
|
||||
[JsonProperty]
|
||||
public readonly HashSet<string> CustomAttributes;
|
||||
|
||||
/// <summary>
|
||||
/// Underlying type of given type, if available.
|
||||
/// Underlying type of given type, if available.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This can be used for determining underlying enum type if <see cref="BaseType"/> is <see cref="Enum"/>.
|
||||
/// This can be used for determining underlying enum type if <see cref="BaseType" /> is <see cref="Enum" />.
|
||||
/// </remarks>
|
||||
[JsonProperty]
|
||||
public readonly string UnderlyingType;
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue