mirror of
https://github.com/JustArchiNET/ArchiSteamFarm
synced 2024-09-20 06:22:13 +00:00
Rider cleanup & improvements
This commit is contained in:
parent
e5ae2abbf0
commit
c1d9d04071
5 changed files with 6 additions and 11 deletions
|
@ -475,7 +475,7 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotS
|
|||
return;
|
||||
}
|
||||
|
||||
ulong contributorSteamID = ASF.GlobalConfig is { SteamOwnerID: > 0 } && new SteamID(ASF.GlobalConfig.SteamOwnerID).IsIndividualAccount ? ASF.GlobalConfig.SteamOwnerID : Bot.Bots.Values.Where(static bot => bot.SteamID > 0).OrderByDescending(static bot => bot.OwnedPackageIDs.Count).FirstOrDefault()?.SteamID ?? 0;
|
||||
ulong contributorSteamID = ASF.GlobalConfig is { SteamOwnerID: > 0 } && new SteamID(ASF.GlobalConfig.SteamOwnerID).IsIndividualAccount ? ASF.GlobalConfig.SteamOwnerID : Bot.Bots.Values.Where(static bot => bot.SteamID > 0).MaxBy(static bot => bot.OwnedPackageIDs.Count)?.SteamID ?? 0;
|
||||
|
||||
if (contributorSteamID == 0) {
|
||||
ASF.ArchiLogger.LogGenericError(string.Format(CultureInfo.CurrentCulture, Strings.SubmissionNoContributorSet, nameof(ASF.GlobalConfig.SteamOwnerID)));
|
||||
|
|
|
@ -302,6 +302,7 @@
|
|||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseNullPropagation/@EntryIndexedValue">SUGGESTION</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseNullPropagationWhenPossible/@EntryIndexedValue">SUGGESTION</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UsePositionalDeconstructionPattern/@EntryIndexedValue">SUGGESTION</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseStringInterpolationWhenPossible/@EntryIndexedValue">SUGGESTION</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseThrowIfNullMethod/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseVerbatimString/@EntryIndexedValue">SUGGESTION</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=WrongIndentSize/@EntryIndexedValue">WARNING</s:String>
|
||||
|
|
|
@ -1307,9 +1307,7 @@ public sealed class Bot : IAsyncDisposable {
|
|||
OrderedDictionary gamesToRedeemInBackground = new();
|
||||
|
||||
using (StreamReader reader = new(filePath)) {
|
||||
string? line;
|
||||
|
||||
while ((line = await reader.ReadLineAsync().ConfigureAwait(false)) != null) {
|
||||
while (await reader.ReadLineAsync().ConfigureAwait(false) is { } line) {
|
||||
if (line.Length == 0) {
|
||||
continue;
|
||||
}
|
||||
|
@ -1831,9 +1829,7 @@ public sealed class Bot : IAsyncDisposable {
|
|||
try {
|
||||
using StreamReader reader = new(filePath);
|
||||
|
||||
string? line;
|
||||
|
||||
while ((line = await reader.ReadLineAsync().ConfigureAwait(false)) != null) {
|
||||
while (await reader.ReadLineAsync().ConfigureAwait(false) is { } line) {
|
||||
if (line.Length == 0) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -74,9 +74,7 @@ internal static class SteamChatMessage {
|
|||
|
||||
using StringReader stringReader = new(message);
|
||||
|
||||
string? line;
|
||||
|
||||
while ((line = await stringReader.ReadLineAsync().ConfigureAwait(false)) != null) {
|
||||
while (await stringReader.ReadLineAsync().ConfigureAwait(false) is { } line) {
|
||||
// Special case for empty newline
|
||||
if (line.Length == 0) {
|
||||
if (messagePart.Length > prefixLength) {
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net48'">
|
||||
<PackageVersion Include="JustArchiNET.Madness" Version="3.2.1" />
|
||||
<PackageVersion Include="JustArchiNET.Madness" Version="3.3.0" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Cors" Version="2.2.0" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Diagnostics" Version="2.2.0" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.HttpOverrides" Version="2.2.0" />
|
||||
|
|
Loading…
Reference in a new issue