diff --git a/ArchiSteamFarm.Tests/IGitHubPluginUpdates.cs b/ArchiSteamFarm.Tests/IGitHubPluginUpdates.cs index c598854ee..196061c81 100644 --- a/ArchiSteamFarm.Tests/IGitHubPluginUpdates.cs +++ b/ArchiSteamFarm.Tests/IGitHubPluginUpdates.cs @@ -44,7 +44,7 @@ internal sealed class IGitHubPluginUpdates { private readonly TestContext TestContext; - private CancellationToken CancellationToken => TestContext.CancellationTokenSource.Token; + private CancellationToken CancellationToken => TestContext.CancellationToken; [UsedImplicitly] public IGitHubPluginUpdates(TestContext testContext) { diff --git a/ArchiSteamFarm.Tests/SteamChatMessage.cs b/ArchiSteamFarm.Tests/SteamChatMessage.cs index e8e18bd75..567654b66 100644 --- a/ArchiSteamFarm.Tests/SteamChatMessage.cs +++ b/ArchiSteamFarm.Tests/SteamChatMessage.cs @@ -38,7 +38,7 @@ namespace ArchiSteamFarm.Tests; internal sealed class SteamChatMessage { private readonly TestContext TestContext; - private CancellationToken CancellationToken => TestContext.CancellationTokenSource.Token; + private CancellationToken CancellationToken => TestContext.CancellationToken; [UsedImplicitly] public SteamChatMessage(TestContext testContext) { diff --git a/ArchiSteamFarm/Helpers/ICrossProcessSemaphore.cs b/ArchiSteamFarm/Helpers/ICrossProcessSemaphore.cs index f9cf93850..f698a4e62 100644 --- a/ArchiSteamFarm/Helpers/ICrossProcessSemaphore.cs +++ b/ArchiSteamFarm/Helpers/ICrossProcessSemaphore.cs @@ -29,7 +29,7 @@ namespace ArchiSteamFarm.Helpers; [PublicAPI] public interface ICrossProcessSemaphore { - void Release(); - Task WaitAsync(CancellationToken cancellationToken = default); - Task WaitAsync(int millisecondsTimeout, CancellationToken cancellationToken = default); + public void Release(); + public Task WaitAsync(CancellationToken cancellationToken = default); + public Task WaitAsync(int millisecondsTimeout, CancellationToken cancellationToken = default); } diff --git a/ArchiSteamFarm/Plugins/Interfaces/IASF.cs b/ArchiSteamFarm/Plugins/Interfaces/IASF.cs index c9fe623c8..eb8287899 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IASF.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IASF.cs @@ -40,5 +40,5 @@ public interface IASF : IPlugin { /// ASF will call this method right after global config initialization. /// /// Extra config properties made out of . Can be null if no extra properties are found. - Task OnASFInit(IReadOnlyDictionary? additionalConfigProperties = null); + public Task OnASFInit(IReadOnlyDictionary? additionalConfigProperties = null); } diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBot.cs b/ArchiSteamFarm/Plugins/Interfaces/IBot.cs index 05eef5785..1126b8a7e 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBot.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBot.cs @@ -40,12 +40,12 @@ public interface IBot : IPlugin { /// Doing so will allow the garbage collector to dispose the bot afterwards, refraining from doing so will create a "memory leak" by keeping the reference alive. /// /// Bot object related to this callback. - Task OnBotDestroy(Bot bot); + public Task OnBotDestroy(Bot bot); /// /// ASF will call this method after creating the bot object, e.g. after config creation. /// Bot config is not yet available at this stage. This function will execute only once for every bot object. /// /// Bot object related to this callback. - Task OnBotInit(Bot bot); + public Task OnBotInit(Bot bot); } diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotCardsFarmerInfo.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotCardsFarmerInfo.cs index 30186ad24..35dcf6591 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotCardsFarmerInfo.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotCardsFarmerInfo.cs @@ -39,17 +39,17 @@ public interface IBotCardsFarmerInfo : IPlugin { /// /// Bot object related to this callback. /// Bool value indicating whether the module has finished successfully, so when there was at least one card to drop, and nothing has interrupted us in the meantime. - Task OnBotFarmingFinished(Bot bot, bool farmedSomething); + public Task OnBotFarmingFinished(Bot bot, bool farmedSomething); /// /// ASF will call this method when cards farming module is started on given bot instance. The module is started only when there are valid cards to drop, so this method won't be called when there is nothing to idle. /// /// Bot object related to this callback. - Task OnBotFarmingStarted(Bot bot); + public Task OnBotFarmingStarted(Bot bot); /// /// ASF will call this method when cards farming module is stopped on given bot instance. The stop could be a result of a natural finish, or other situations (e.g. Steam networking issues, user commands). /// /// Bot object related to this callback. - Task OnBotFarmingStopped(Bot bot); + public Task OnBotFarmingStopped(Bot bot); } diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotCommand2.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotCommand2.cs index fb86fce58..05de18fd3 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotCommand2.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotCommand2.cs @@ -44,5 +44,5 @@ public interface IBotCommand2 : IPlugin { /// Pre-parsed message using standard ASF delimiters. /// Optionally, steamID of the user who executed the command - may not be available with value of 0 (e.g. ASF API). /// Response to the command, or null/empty (as the task value) if the command isn't handled by this plugin. - Task OnBotCommand(Bot bot, EAccess access, string message, string[] args, ulong steamID = 0); + public Task OnBotCommand(Bot bot, EAccess access, string message, string[] args, ulong steamID = 0); } diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotConnection.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotConnection.cs index c79769b06..745a916ce 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotConnection.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotConnection.cs @@ -39,11 +39,11 @@ public interface IBotConnection : IPlugin { /// /// Bot object related to this callback. /// Reason for disconnection, or if the disconnection was initiated by ASF (e.g. as a result of a command). - Task OnBotDisconnected(Bot bot, EResult reason); + public Task OnBotDisconnected(Bot bot, EResult reason); /// /// ASF will call this method when bot successfully connects to Steam network. /// /// Bot object related to this callback. - Task OnBotLoggedOn(Bot bot); + public Task OnBotLoggedOn(Bot bot); } diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotCustomMachineInfoProvider.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotCustomMachineInfoProvider.cs index d0f12e481..c306a0774 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotCustomMachineInfoProvider.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotCustomMachineInfoProvider.cs @@ -41,5 +41,5 @@ public interface IBotCustomMachineInfoProvider : IPlugin { /// This method will be called with very limited amount of bot-related data, as it's used during bot initialization. We recommend to stick with , and exclusively. /// Bot object related to this callback. /// that will be used for the particular bot. You can return null if you want to use default implementation. - Task GetMachineInfoProvider(Bot bot); + public Task GetMachineInfoProvider(Bot bot); } diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotFriendRequest.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotFriendRequest.cs index 72cd68bff..53e3231c3 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotFriendRequest.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotFriendRequest.cs @@ -39,5 +39,5 @@ public interface IBotFriendRequest : IPlugin { /// Bot object related to this callback. /// 64-bit Steam identificator of the user that sent a friend request, or a group that the bot has been invited to. /// True if the request should be accepted as part of this plugin, false otherwise. - Task OnBotFriendRequest(Bot bot, ulong steamID); + public Task OnBotFriendRequest(Bot bot, ulong steamID); } diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotIdentity.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotIdentity.cs index dad74bdd7..a3731d216 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotIdentity.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotIdentity.cs @@ -41,5 +41,5 @@ public interface IBotIdentity : IPlugin { /// Full data received by ASF in the callback that relates to this bot (Steam) account. /// Parsed nickname set for this bot (Steam) account. /// Parsed hash of the avatar of this bot (Steam) account, as hex. - Task OnSelfPersonaState(Bot bot, SteamFriends.PersonaStateCallback data, string? nickname, string? avatarHash); + public Task OnSelfPersonaState(Bot bot, SteamFriends.PersonaStateCallback data, string? nickname, string? avatarHash); } diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotMessage.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotMessage.cs index 20290c81e..64cce559b 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotMessage.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotMessage.cs @@ -42,5 +42,5 @@ public interface IBotMessage : IPlugin { /// 64-bit long unsigned integer of steamID executing the command. /// Message in its raw format. /// Response to the message, or null/empty (as the task value) for silence. - Task OnBotMessage(Bot bot, ulong steamID, string message); + public Task OnBotMessage(Bot bot, ulong steamID, string message); } diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotModules.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotModules.cs index ae776f013..b9b0b1a97 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotModules.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotModules.cs @@ -42,5 +42,5 @@ public interface IBotModules : IPlugin { /// /// Bot object related to this callback. /// Extra config properties made out of . Can be null if no extra properties are found. - Task OnBotInitModules(Bot bot, IReadOnlyDictionary? additionalConfigProperties = null); + public Task OnBotInitModules(Bot bot, IReadOnlyDictionary? additionalConfigProperties = null); } diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotSteamClient.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotSteamClient.cs index 815a8f8d2..4409e520e 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotSteamClient.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotSteamClient.cs @@ -40,12 +40,12 @@ public interface IBotSteamClient : IPlugin { /// /// Bot object related to this callback. /// Callback manager object which can be used for establishing subscriptions to standard and custom callbacks. - Task OnBotSteamCallbacksInit(Bot bot, CallbackManager callbackManager); + public Task OnBotSteamCallbacksInit(Bot bot, CallbackManager callbackManager); /// /// ASF will call this method right after bot initialization in order to allow you hooking custom SK2 client handlers into the SteamClient. /// /// Bot object related to this callback. /// Collection of custom client handlers that are supposed to be hooked into the SteamClient by ASF. If you do not require any, just return null or empty collection. - Task?> OnBotSteamHandlersInit(Bot bot); + public Task?> OnBotSteamHandlersInit(Bot bot); } diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotTradeOffer2.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotTradeOffer2.cs index 2e25bc4c3..7db435ec1 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotTradeOffer2.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotTradeOffer2.cs @@ -42,5 +42,5 @@ public interface IBotTradeOffer2 : IPlugin { /// Trade offer related to this callback. /// ASF result in regards to parsing this trade offer, can be useful for determining why it wasn't accepted as part of the core logic. /// True if the trade offer should be accepted as part of this plugin, false otherwise. - Task OnBotTradeOffer(Bot bot, TradeOffer tradeOffer, ParseTradeResult.EResult asfResult); + public Task OnBotTradeOffer(Bot bot, TradeOffer tradeOffer, ParseTradeResult.EResult asfResult); } diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotTradeOfferResults.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotTradeOfferResults.cs index 412bb498e..9eb3d1d81 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotTradeOfferResults.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotTradeOfferResults.cs @@ -40,5 +40,5 @@ public interface IBotTradeOfferResults : IPlugin { /// /// Bot object related to this callback. /// Trade results related to this callback. - Task OnBotTradeOfferResults(Bot bot, IReadOnlyCollection tradeResults); + public Task OnBotTradeOfferResults(Bot bot, IReadOnlyCollection tradeResults); } diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotUserNotifications.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotUserNotifications.cs index b260364d1..6deee3b6c 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotUserNotifications.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotUserNotifications.cs @@ -40,5 +40,5 @@ public interface IBotUserNotifications : IPlugin { /// /// Bot object related to this callback. /// Collection containing those notification types that are new (that is, when new count > previous count of that notification type). - Task OnBotUserNotifications(Bot bot, IReadOnlyCollection newNotifications); + public Task OnBotUserNotifications(Bot bot, IReadOnlyCollection newNotifications); } diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotsComparer.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotsComparer.cs index d07a6eb03..5e6d7d8e7 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotsComparer.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotsComparer.cs @@ -37,5 +37,5 @@ public interface IBotsComparer : IPlugin { /// Unless you know what you're doing, you should not implement this property yourself and let ASF decide. /// /// Comparer that will be used for the bots, as well as bot regexes. - StringComparer BotsComparer => StringComparer.Ordinal; + public StringComparer BotsComparer => StringComparer.Ordinal; } diff --git a/ArchiSteamFarm/Plugins/Interfaces/ICrossProcessSemaphoreProvider.cs b/ArchiSteamFarm/Plugins/Interfaces/ICrossProcessSemaphoreProvider.cs index 38a4be229..acc951c9f 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/ICrossProcessSemaphoreProvider.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/ICrossProcessSemaphoreProvider.cs @@ -39,5 +39,5 @@ public interface ICrossProcessSemaphoreProvider : IPlugin { /// /// Unique resource name provided by ASF for identification purposes. /// Concrete implementation of providing required functionality. It's allowed to return null if you want to use ASF's default implementation for specified resource instead. - Task GetCrossProcessSemaphore(string resourceName); + public Task GetCrossProcessSemaphore(string resourceName); } diff --git a/ArchiSteamFarm/Plugins/Interfaces/IGitHubPluginUpdates.cs b/ArchiSteamFarm/Plugins/Interfaces/IGitHubPluginUpdates.cs index 05944ab06..bfccfd05f 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IGitHubPluginUpdates.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IGitHubPluginUpdates.cs @@ -48,14 +48,14 @@ public interface IGitHubPluginUpdates : IPluginUpdates { /// Boolean value that determines whether your plugin is able to update at the time of calling. You may provide false if, for example, you're inside a critical section and you don't want to update at this time, despite supporting updates otherwise. /// This effectively skips unnecessary request to GitHub if you're certain that you're not interested in any updates right now. /// - bool CanUpdate => true; + public bool CanUpdate => true; /// /// ASF will use this property as a target for GitHub updates. GitHub repository specified here must have valid releases that will be used for updates. /// /// Repository name in format of {Author}/{Repository}. /// JustArchiNET/ArchiSteamFarm - string RepositoryName { get; } + public string RepositoryName { get; } Task IPluginUpdates.GetTargetReleaseURL(Version asfVersion, string asfVariant, bool asfUpdate, GlobalConfig.EUpdateChannel updateChannel, bool forced) { ArgumentNullException.ThrowIfNull(asfVersion); @@ -104,7 +104,7 @@ public interface IGitHubPluginUpdates : IPluginUpdates { /// - *.zip, if exactly one match is found /// /// Target release asset from those provided that should be used for auto-update. You may return null if the update is unavailable, for example, because ASF version/variant is determined unsupported, or due to any other reason. - Task GetTargetReleaseAsset(Version asfVersion, string asfVariant, Version newPluginVersion, IReadOnlyCollection releaseAssets) { + public Task GetTargetReleaseAsset(Version asfVersion, string asfVariant, Version newPluginVersion, IReadOnlyCollection releaseAssets) { ArgumentNullException.ThrowIfNull(asfVersion); ArgumentException.ThrowIfNullOrEmpty(asfVariant); ArgumentNullException.ThrowIfNull(newPluginVersion); diff --git a/ArchiSteamFarm/Plugins/Interfaces/IPlugin.cs b/ArchiSteamFarm/Plugins/Interfaces/IPlugin.cs index 3491bbb34..482c00e21 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IPlugin.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IPlugin.cs @@ -38,7 +38,7 @@ public interface IPlugin { /// /// String that will be used as the name of this plugin. [JsonInclude] - string Name { get; } + public string Name { get; } /// /// ASF will use this property as version indicator of your plugin to the user. @@ -46,10 +46,10 @@ public interface IPlugin { /// /// Version that will be shown to the user when plugin is loaded. [JsonInclude] - Version Version { get; } + public Version Version { get; } /// /// ASF will call this method right after plugin initialization. /// - Task OnLoaded(); + public Task OnLoaded(); } diff --git a/ArchiSteamFarm/Plugins/Interfaces/IPluginUpdates.cs b/ArchiSteamFarm/Plugins/Interfaces/IPluginUpdates.cs index 33c89580e..ed82b6d8d 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IPluginUpdates.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IPluginUpdates.cs @@ -45,15 +45,15 @@ public interface IPluginUpdates : IPlugin { /// ASF update channel specified for this request. This might be different from the one specified in , as user might've specified other one for this request. /// Boolean value specifying whether user has requested forced plugin update, that is, one that should always execute if possible - even with the same and lower version (downgrade). /// Target release asset URL that should be used for auto-update. It's permitted to return null if you want to skip update, e.g. because no new version is available. - Task GetTargetReleaseURL(Version asfVersion, string asfVariant, bool asfUpdate, GlobalConfig.EUpdateChannel updateChannel, bool forced); + public Task GetTargetReleaseURL(Version asfVersion, string asfVariant, bool asfUpdate, GlobalConfig.EUpdateChannel updateChannel, bool forced); /// /// ASF will call this method after update to the new plugin version has been finished, just before restart of the process. /// - Task OnPluginUpdateFinished() => Task.CompletedTask; + public Task OnPluginUpdateFinished() => Task.CompletedTask; /// /// ASF will call this method before proceeding with an update to the new plugin version. /// - Task OnPluginUpdateProceeding() => Task.CompletedTask; + public Task OnPluginUpdateProceeding() => Task.CompletedTask; } diff --git a/ArchiSteamFarm/Plugins/Interfaces/ISteamPICSChanges.cs b/ArchiSteamFarm/Plugins/Interfaces/ISteamPICSChanges.cs index 9f73fd1b2..bf33411fd 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/ISteamPICSChanges.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/ISteamPICSChanges.cs @@ -38,7 +38,7 @@ public interface ISteamPICSChanges : IPlugin { /// ASF uses this method for determining the point in time from which it should keep history going upon a restart. The actual point in time that will be used is calculated as the lowest change number from all loaded plugins, to guarantee that no plugin will miss any changes, while allowing possible duplicates for those plugins that were already synchronized with newer changes. If you don't care about persistent state and just want to receive the ongoing history, you should return 0 (which is equal to "I'm fine with any"). If there won't be any plugin asking for a specific point in time, ASF will start returning entries since the start of the program. /// /// The most recent change number from which you're fine to receive . - Task GetPreferredChangeNumberToStartFrom(); + public Task GetPreferredChangeNumberToStartFrom(); /// /// ASF will call this method upon receiving any app/package PICS changes. The history is guaranteed to be precise and continuous starting from until is called. It's possible for this method to have duplicated calls across different runs, in particular when some other plugin asks for lower , therefore you should keep that in mind (and refer to change number of standalone apps/packages). @@ -46,11 +46,11 @@ public interface ISteamPICSChanges : IPlugin { /// The change number of current callback. /// App changes that happened since the previous call of this method. Can be empty. /// Package changes that happened since the previous call of this method. Can be empty. - Task OnPICSChanges(uint currentChangeNumber, IReadOnlyDictionary appChanges, IReadOnlyDictionary packageChanges); + public Task OnPICSChanges(uint currentChangeNumber, IReadOnlyDictionary appChanges, IReadOnlyDictionary packageChanges); /// /// ASF will call this method when it'll be necessary to restart the history of PICS changes. This can happen due to Steam limitation in which we're unable to keep history going if we're too far behind (approx 5k changeNumbers). If you're relying on continuous history of app/package PICS changes sent by , ASF can no longer guarantee that upon calling this method, therefore you should start clean. /// /// The change number from which we're restarting the PICS history. - Task OnPICSChangesRestart(uint currentChangeNumber); + public Task OnPICSChangesRestart(uint currentChangeNumber); } diff --git a/ArchiSteamFarm/Plugins/Interfaces/IUpdateAware.cs b/ArchiSteamFarm/Plugins/Interfaces/IUpdateAware.cs index ec901bae4..23face640 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IUpdateAware.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IUpdateAware.cs @@ -38,12 +38,12 @@ public interface IUpdateAware : IPlugin { /// /// The current (old) version of ASF program. /// The target (new) version of ASF program. - Task OnUpdateFinished(Version currentVersion, Version newVersion); + public Task OnUpdateFinished(Version currentVersion, Version newVersion); /// /// ASF will call this method before proceeding with an update to a particular ASF version. /// /// The current (old) version of ASF program. /// The target (new) version of ASF program. - Task OnUpdateProceeding(Version currentVersion, Version newVersion); + public Task OnUpdateProceeding(Version currentVersion, Version newVersion); } diff --git a/ArchiSteamFarm/Plugins/Interfaces/IWebInterface.cs b/ArchiSteamFarm/Plugins/Interfaces/IWebInterface.cs index 10bac03e6..862a2b769 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IWebInterface.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IWebInterface.cs @@ -35,7 +35,7 @@ public interface IWebInterface : IPlugin { /// /// www /// You'll need to ship this folder together with your plugin for the interface to work. - string PhysicalPath => "www"; + public string PhysicalPath => "www"; /// /// Specifies web path (address) under which ASF should host your static WWW files in directory. Default value of "/" allows you to override default ASF files and gives you full flexibility in your directory. However, you can instead host your files under some other fixed location specified here, such as "/MyPlugin", which is especially useful if you want to have your own default index.html in addition to the one provided by us (ASF-ui). @@ -43,5 +43,5 @@ public interface IWebInterface : IPlugin { /// /MyPlugin /// If you're using path other than default, ensure it does NOT end with a slash. [JsonInclude] - string WebPath => "/"; + public string WebPath => "/"; } diff --git a/ArchiSteamFarm/Plugins/Interfaces/IWebServiceProvider.cs b/ArchiSteamFarm/Plugins/Interfaces/IWebServiceProvider.cs index 9a9873a28..b31218584 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IWebServiceProvider.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IWebServiceProvider.cs @@ -37,11 +37,11 @@ public interface IWebServiceProvider : IPlugin { /// ASF will call this method during configuration of the IPC endpoints. /// /// Application builder related to this callback. - void OnConfiguringEndpoints(IApplicationBuilder app); + public void OnConfiguringEndpoints(IApplicationBuilder app); /// /// ASF will call this method during configuration of the IPC services. /// /// Service collection related to this callback. - void OnConfiguringServices(IServiceCollection services); + public void OnConfiguringServices(IServiceCollection services); } diff --git a/ArchiSteamFarm/Steam/Integration/ArchiHandler.cs b/ArchiSteamFarm/Steam/Integration/ArchiHandler.cs index f736c032d..cd418e7bd 100644 --- a/ArchiSteamFarm/Steam/Integration/ArchiHandler.cs +++ b/ArchiSteamFarm/Steam/Integration/ArchiHandler.cs @@ -986,7 +986,7 @@ public sealed class ArchiHandler : ClientMsgHandler, IDisposable { } if (gameIDs.Count > 0) { - IReadOnlySet uniqueGameIDs = gameIDs as IReadOnlySet ?? gameIDs.ToHashSet(); + IEnumerable uniqueGameIDs = gameIDs as IReadOnlySet ?? gameIDs.Distinct(); foreach (uint gameID in uniqueGameIDs.Where(static gameID => gameID > 0)) { if (request.Body.games_played.Count >= MaxGamesPlayedConcurrently) { diff --git a/ArchiSteamFarm/Steam/Storage/BotDatabase.cs b/ArchiSteamFarm/Steam/Storage/BotDatabase.cs index c8043a4a4..40908d274 100644 --- a/ArchiSteamFarm/Steam/Storage/BotDatabase.cs +++ b/ArchiSteamFarm/Steam/Storage/BotDatabase.cs @@ -103,7 +103,7 @@ public sealed class BotDatabase : GenericDatabase { [JsonInclude] [JsonPropertyName("BackingExtraStorePackagesRefreshedAt")] internal DateTime ExtraStorePackagesRefreshedAt { - get => field; + get; set { if (field == value) {