diff --git a/ArchiSteamFarm.CustomPlugins.ExamplePlugin/ExamplePlugin.cs b/ArchiSteamFarm.CustomPlugins.ExamplePlugin/ExamplePlugin.cs index 0ae7b95ab..52aa58b26 100644 --- a/ArchiSteamFarm.CustomPlugins.ExamplePlugin/ExamplePlugin.cs +++ b/ArchiSteamFarm.CustomPlugins.ExamplePlugin/ExamplePlugin.cs @@ -22,6 +22,7 @@ using System; using System.Collections.Generic; using System.Composition; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Threading.Tasks; using ArchiSteamFarm.Core; @@ -40,6 +41,7 @@ namespace ArchiSteamFarm.CustomPlugins.ExamplePlugin; // Your plugin class should inherit the plugin interfaces it wants to handle // If you do not want to handle a particular action (e.g. OnBotMessage that is offered in IBotMessage), it's the best idea to not inherit it at all // This will keep your code compact, efficient and less dependent. You can always add additional interfaces when you'll need them, this example project will inherit quite a bit of them to show you potential usage +[SuppressMessage("ReSharper", "MemberCanBeFileLocal")] internal sealed class ExamplePlugin : IASF, IBot, IBotCommand2, IBotConnection, IBotFriendRequest, IBotMessage, IBotModules, IBotTradeOffer { // This is used for identification purposes, typically you want to use a friendly name of your plugin here, such as the name of your main class // Please note that this property can have direct dependencies only on structures that were initialized by the constructor, as it's possible to be called before OnLoaded() takes place diff --git a/ArchiSteamFarm.OfficialPlugins.MobileAuthenticator/MobileAuthenticatorPlugin.cs b/ArchiSteamFarm.OfficialPlugins.MobileAuthenticator/MobileAuthenticatorPlugin.cs index 7655c974e..6d5cf72ab 100644 --- a/ArchiSteamFarm.OfficialPlugins.MobileAuthenticator/MobileAuthenticatorPlugin.cs +++ b/ArchiSteamFarm.OfficialPlugins.MobileAuthenticator/MobileAuthenticatorPlugin.cs @@ -23,6 +23,7 @@ using System; using System.Collections.Generic; using System.ComponentModel; using System.Composition; +using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; using ArchiSteamFarm.Core; using ArchiSteamFarm.OfficialPlugins.MobileAuthenticator.Localization; @@ -35,6 +36,7 @@ using SteamKit2; namespace ArchiSteamFarm.OfficialPlugins.MobileAuthenticator; [Export(typeof(IPlugin))] +[SuppressMessage("ReSharper", "MemberCanBeFileLocal")] internal sealed class MobileAuthenticatorPlugin : OfficialPlugin, IBotCommand2, IBotSteamClient { [JsonProperty] public override string Name => nameof(MobileAuthenticatorPlugin); diff --git a/ArchiSteamFarm.sln.DotSettings b/ArchiSteamFarm.sln.DotSettings index f1c8eaf80..26efa745c 100644 --- a/ArchiSteamFarm.sln.DotSettings +++ b/ArchiSteamFarm.sln.DotSettings @@ -227,6 +227,7 @@ WARNING WARNING WARNING + SUGGESTION SUGGESTION WARNING WARNING @@ -246,6 +247,7 @@ WARNING DO_NOT_SHOW WARNING + SUGGESTION SUGGESTION SUGGESTION SUGGESTION @@ -279,6 +281,7 @@ SUGGESTION SUGGESTION SUGGESTION + SUGGESTION SUGGESTION SUGGESTION SUGGESTION @@ -314,9 +317,11 @@ SUGGESTION SUGGESTION SUGGESTION + DO_NOT_SHOW SUGGESTION WARNING SUGGESTION + SUGGESTION WARNING WARNING WARNING diff --git a/ArchiSteamFarm/Core/Utilities.cs b/ArchiSteamFarm/Core/Utilities.cs index c8f34856f..b0078ff94 100644 --- a/ArchiSteamFarm/Core/Utilities.cs +++ b/ArchiSteamFarm/Core/Utilities.cs @@ -112,7 +112,7 @@ public static class Utilities { public static void InBackground(Func function, bool longRunning = false) { ArgumentNullException.ThrowIfNull(function); - InBackground(void() => function(), longRunning); + InBackground(void () => function(), longRunning); } [PublicAPI] diff --git a/ArchiSteamFarm/Program.cs b/ArchiSteamFarm/Program.cs index 6a6ca4686..d13aaa466 100644 --- a/ArchiSteamFarm/Program.cs +++ b/ArchiSteamFarm/Program.cs @@ -584,8 +584,6 @@ internal static class Program { bool networkGroupNext = false; bool pathNext = false; - bool noArgumentValueNext() => !cryptKeyNext && !cryptKeyFileNext && !networkGroupNext && !pathNext; - foreach (string arg in args) { switch (arg.ToUpperInvariant()) { case "--CRYPTKEY" when noArgumentValueNext(): @@ -697,6 +695,8 @@ internal static class Program { } return true; + + bool noArgumentValueNext() => !cryptKeyNext && !cryptKeyFileNext && !networkGroupNext && !pathNext; } private static async Task ParseEnvironmentVariables() { diff --git a/ArchiSteamFarm/Web/GitHub.cs b/ArchiSteamFarm/Web/GitHub.cs index 4b09d5ba5..302e96f71 100644 --- a/ArchiSteamFarm/Web/GitHub.cs +++ b/ArchiSteamFarm/Web/GitHub.cs @@ -166,7 +166,7 @@ internal static class GitHub { MarkdownDocument markdownDocument = Markdown.Parse(markdownText); MarkdownDocument result = new(); - foreach (Block block in markdownDocument.SkipWhile(static block => block is not HeadingBlock { Inline.FirstChild: LiteralInline literalInline } || !literalInline.Content.ToString().Equals("Changelog", StringComparison.OrdinalIgnoreCase)).Skip(1).TakeWhile(static block => block is not ThematicBreakBlock).ToList()) { + foreach (Block block in markdownDocument.SkipWhile(static block => block is not HeadingBlock { Inline.FirstChild: LiteralInline literalInline } || (literalInline.Content.ToString()?.Equals("Changelog", StringComparison.OrdinalIgnoreCase) != true)).Skip(1).TakeWhile(static block => block is not ThematicBreakBlock).ToList()) { // All blocks that we're interested in must be removed from original markdownDocument firstly markdownDocument.Remove(block); result.Add(block);