diff --git a/ArchiSteamFarm/Plugins/Interfaces/IASF.cs b/ArchiSteamFarm/Plugins/Interfaces/IASF.cs index 499ddf23f..7a3d4e837 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IASF.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IASF.cs @@ -29,6 +29,11 @@ using JetBrains.Annotations; namespace ArchiSteamFarm.Plugins.Interfaces; +/// +/// +/// Implementing this interface allows you to easily register your own data structures upon ASF initialization. This is especially useful if you want to register those based on the ASF's global config. +/// +/// If your logic doesn't require ASF settings, you can consider using core method instead. Implementing this interface might still make sense, since it happens later during ASF initialization and provides more available data structures. [PublicAPI] public interface IASF : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBot.cs b/ArchiSteamFarm/Plugins/Interfaces/IBot.cs index f3e84b19d..cab748130 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBot.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBot.cs @@ -27,6 +27,11 @@ using JetBrains.Annotations; namespace ArchiSteamFarm.Plugins.Interfaces; +/// +/// +/// Implementing this interface allows you to register core settings-independent structures on per-bot basis. +/// +/// If your logic requires bot's settings, consider implementing instead. Implementing this interface might still make sense, e.g. for disposal of the structures upon . [PublicAPI] public interface IBot : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotCardsFarmerInfo.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotCardsFarmerInfo.cs index d96fe2cb0..a577cff99 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotCardsFarmerInfo.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotCardsFarmerInfo.cs @@ -23,10 +23,15 @@ using System.Threading.Tasks; using ArchiSteamFarm.Steam; +using ArchiSteamFarm.Steam.Cards; using JetBrains.Annotations; namespace ArchiSteamFarm.Plugins.Interfaces; +/// +/// +/// Implementing this interface allows you to receive updates in regards to ASF's module, in particular events related to its state. +/// [PublicAPI] public interface IBotCardsFarmerInfo : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotCommand2.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotCommand2.cs index ccf2a2511..b17a90c28 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotCommand2.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotCommand2.cs @@ -28,6 +28,11 @@ using JetBrains.Annotations; namespace ArchiSteamFarm.Plugins.Interfaces; +/// +/// +/// Implementing this interface allows you to react to each command received by ASF, in particular, implementing your own custom commands. +/// +/// This is used for commands, irrelevant of their origin (IPC, console, Steam). If you want to grab non-command Steam messages, check interface instead. [PublicAPI] public interface IBotCommand2 : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotConnection.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotConnection.cs index 767b5dec7..542aab0fa 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotConnection.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotConnection.cs @@ -28,6 +28,10 @@ using SteamKit2; namespace ArchiSteamFarm.Plugins.Interfaces; +/// +/// +/// Implementing this interface allows you to monitor Bot's connection with the Steam network, in particular when it goes online and offline. +/// [PublicAPI] public interface IBotConnection : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotCustomMachineInfoProvider.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotCustomMachineInfoProvider.cs index 9f99c1d0a..cc295552d 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotCustomMachineInfoProvider.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotCustomMachineInfoProvider.cs @@ -28,6 +28,10 @@ using SteamKit2; namespace ArchiSteamFarm.Plugins.Interfaces; +/// +/// +/// Implementing this interface allows you to provide low-level machine info provider that will be used for providing core information during Steam login procedure. +/// [PublicAPI] public interface IBotCustomMachineInfoProvider : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotFriendRequest.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotFriendRequest.cs index e7472d44b..32a0f074c 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotFriendRequest.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotFriendRequest.cs @@ -27,6 +27,10 @@ using JetBrains.Annotations; namespace ArchiSteamFarm.Plugins.Interfaces; +/// +/// +/// Implementing this interface allows you to handle friend requests on the Steam platform. +/// [PublicAPI] public interface IBotFriendRequest : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotIdentity.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotIdentity.cs index 802273bc7..e3a5222f2 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotIdentity.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotIdentity.cs @@ -28,6 +28,10 @@ using SteamKit2; namespace ArchiSteamFarm.Plugins.Interfaces; +/// +/// +/// Implementing this interface allows you to discover core properties of your bot's identity, upon logging in to the Steam network. +/// [PublicAPI] public interface IBotIdentity : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotMessage.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotMessage.cs index 4f51a806b..d0cb7b747 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotMessage.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotMessage.cs @@ -28,6 +28,11 @@ using JetBrains.Annotations; namespace ArchiSteamFarm.Plugins.Interfaces; +/// +/// +/// Implementing this interface allows you to react to each message received on the Steam platform. +/// +/// This is used for Steam messages exclusively, that are not ASF commands. If you want to grab the commands, check interface instead. [PublicAPI] public interface IBotMessage : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotModules.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotModules.cs index 9a506bd82..bc66595e3 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotModules.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotModules.cs @@ -30,6 +30,11 @@ using JetBrains.Annotations; namespace ArchiSteamFarm.Plugins.Interfaces; +/// +/// +/// Implementing this interface allows you to easily register your own custom modules on per-bot basis. This is especially useful if you want to register those based on the bot's config. +/// +/// If your modules do not depend on bot's settings, you can consider implementing interface instead. Even without that requirement, implementing that interface might still make sense, e.g. for disposal of the structures in . [PublicAPI] public interface IBotModules : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotSteamClient.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotSteamClient.cs index 11cefa3f6..8bc1567b3 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotSteamClient.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotSteamClient.cs @@ -29,6 +29,10 @@ using SteamKit2; namespace ArchiSteamFarm.Plugins.Interfaces; +/// +/// +/// Implementing this interface allows you to register your own SteamKit2 message handlers, which means controlling the traffic that comes from the Steam network. +/// [PublicAPI] public interface IBotSteamClient : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotTradeOffer.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotTradeOffer.cs index 2aacc7433..40c7cbb22 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotTradeOffer.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotTradeOffer.cs @@ -28,6 +28,10 @@ using JetBrains.Annotations; namespace ArchiSteamFarm.Plugins.Interfaces; +/// +/// +/// Implementing this interface allows your plugin to implement custom logic for accepting trades that ASF isn't willing to handle itself. +/// [PublicAPI] public interface IBotTradeOffer : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotTradeOfferResults.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotTradeOfferResults.cs index 726d2311f..5b405fa62 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotTradeOfferResults.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotTradeOfferResults.cs @@ -29,6 +29,10 @@ using JetBrains.Annotations; namespace ArchiSteamFarm.Plugins.Interfaces; +/// +/// +/// Implementing this interface allows you to receive information about all processed trades, in particular if you want to fire some logic based on trade offers being handled. +/// [PublicAPI] public interface IBotTradeOfferResults : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotUserNotifications.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotUserNotifications.cs index aa2c40825..b840d362f 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotUserNotifications.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotUserNotifications.cs @@ -29,6 +29,10 @@ using JetBrains.Annotations; namespace ArchiSteamFarm.Plugins.Interfaces; +/// +/// +/// Implementing this interface allows you to receive Steam notifications transmitted over the network. +/// [PublicAPI] public interface IBotUserNotifications : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/Interfaces/IBotsComparer.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotsComparer.cs index 67d4f9a7c..36df18686 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IBotsComparer.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotsComparer.cs @@ -26,6 +26,10 @@ using JetBrains.Annotations; namespace ArchiSteamFarm.Plugins.Interfaces; +/// +/// +/// Implementing this interface allows you to change the default string comparers used across ASF. +/// [PublicAPI] public interface IBotsComparer : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/Interfaces/ICrossProcessSemaphoreProvider.cs b/ArchiSteamFarm/Plugins/Interfaces/ICrossProcessSemaphoreProvider.cs index aafcf7b83..cb979baed 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/ICrossProcessSemaphoreProvider.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/ICrossProcessSemaphoreProvider.cs @@ -27,6 +27,11 @@ using JetBrains.Annotations; namespace ArchiSteamFarm.Plugins.Interfaces; +/// +/// +/// Implementing this interface allows you to provide custom cross-process semaphore, which is used for synchronizing multiple ASF instances with their limiters. +/// Custom cross-process semaphore might be useful if you wanted to extend cross-process semaphore offered by ASF, e.g. by utilizing remote-oriented tools like redis and allowing ASF instances over several different machines to synchronize with each other. +/// [PublicAPI] public interface ICrossProcessSemaphoreProvider : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/Interfaces/IPlugin.cs b/ArchiSteamFarm/Plugins/Interfaces/IPlugin.cs index 75a4687a0..ad97b3473 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IPlugin.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IPlugin.cs @@ -29,6 +29,9 @@ using JetBrains.Annotations; namespace ArchiSteamFarm.Plugins.Interfaces; +/// +/// Implementing this interface allows you to register your plugin in ASF, in turn providing you a way to implement your own custom logic. +/// [PublicAPI] public interface IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/Interfaces/IPluginUpdates.cs b/ArchiSteamFarm/Plugins/Interfaces/IPluginUpdates.cs index 62a932368..d6cc94d46 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IPluginUpdates.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IPluginUpdates.cs @@ -28,6 +28,7 @@ using JetBrains.Annotations; namespace ArchiSteamFarm.Plugins.Interfaces; +/// /// /// Implementing this interface allows you to provide custom logic for updating your plugin to newer version. /// Plugin updates are happening on usual basis per configuration of auto-updates from ASF, as well as other triggers such as update command. diff --git a/ArchiSteamFarm/Plugins/Interfaces/ISteamPICSChanges.cs b/ArchiSteamFarm/Plugins/Interfaces/ISteamPICSChanges.cs index 5da7b630c..afc285afe 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/ISteamPICSChanges.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/ISteamPICSChanges.cs @@ -28,6 +28,10 @@ using SteamKit2; namespace ArchiSteamFarm.Plugins.Interfaces; +/// +/// +/// Implementing this interface allows you to be notified about PICS changes, which is Steam mechanism for broadcasting app and package updates. +/// [PublicAPI] public interface ISteamPICSChanges : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/Interfaces/IUpdateAware.cs b/ArchiSteamFarm/Plugins/Interfaces/IUpdateAware.cs index 7f533b1a4..a700f3fce 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IUpdateAware.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IUpdateAware.cs @@ -27,6 +27,10 @@ using JetBrains.Annotations; namespace ArchiSteamFarm.Plugins.Interfaces; +/// +/// +/// Implementing this interface allows you to be aware of ASF updates and execute appropriate logic that you need to happen before/after such update happens. +/// [PublicAPI] public interface IUpdateAware : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/Interfaces/IWebInterface.cs b/ArchiSteamFarm/Plugins/Interfaces/IWebInterface.cs index 61bfe5b3f..aa740c221 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IWebInterface.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IWebInterface.cs @@ -25,6 +25,7 @@ using System.Text.Json.Serialization; namespace ArchiSteamFarm.Plugins.Interfaces; +/// /// /// Implementing this interface allows you to provide your own (custom) web interface files that will be exposed by standard ASF's IPC interface. In order to achieve that, you must include a directory with your web interface (html, css, js) files together with your plugin's DLL assembly, then specify path to it in and finally the path under which you want to host those files in . /// @@ -32,11 +33,15 @@ public interface IWebInterface : IPlugin { /// /// Specifies physical path to static WWW files provided by the plugin. Can be either relative to plugin's assembly location, or absolute. Default value of "www" assumes that you ship "www" directory together with your plugin's main DLL assembly, similar to ASF. /// + /// www + /// You'll need to ship this folder together with your plugin for the interface to work. 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". + /// 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). /// + /// /MyPlugin + /// If you're using path other than default, ensure it does NOT end with a slash. [JsonInclude] string WebPath => "/"; } diff --git a/ArchiSteamFarm/Plugins/Interfaces/IWebServiceProvider.cs b/ArchiSteamFarm/Plugins/Interfaces/IWebServiceProvider.cs index ac82d3b21..9aed64845 100644 --- a/ArchiSteamFarm/Plugins/Interfaces/IWebServiceProvider.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IWebServiceProvider.cs @@ -27,19 +27,20 @@ using Microsoft.Extensions.DependencyInjection; namespace ArchiSteamFarm.Plugins.Interfaces; +/// /// /// Implementing this interface allows you to provide your own additional services and middlewares for IPC endpoints - Use with caution! /// [PublicAPI] -public interface IWebServiceProvider { +public interface IWebServiceProvider : IPlugin { /// - /// ASF will call this method during configuration of the IPC endpoints + /// ASF will call this method during configuration of the IPC endpoints. /// /// Application builder related to this callback. void OnConfiguringEndpoints(IApplicationBuilder app); /// - /// ASF will call this method during configuration of the IPC services + /// ASF will call this method during configuration of the IPC services. /// /// Service collection related to this callback. void OnConfiguringServices(IServiceCollection services);