mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
Misc syntax improvements
This commit is contained in:
@@ -112,7 +112,7 @@ public static class Utilities {
|
||||
public static void InBackground<T>(Func<T> function, bool longRunning = false) {
|
||||
ArgumentNullException.ThrowIfNull(function);
|
||||
|
||||
InBackground(void() => function(), longRunning);
|
||||
InBackground(void () => function(), longRunning);
|
||||
}
|
||||
|
||||
[PublicAPI]
|
||||
|
||||
@@ -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<bool> ParseEnvironmentVariables() {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user