mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-13 23:20:37 +00:00
R# cleanup
This commit is contained in:
@@ -79,6 +79,7 @@ namespace ArchiSteamFarm {
|
||||
internal async Task AddBlacklistedFromTradesSteamIDs(IReadOnlyCollection<ulong> steamIDs) {
|
||||
if ((steamIDs == null) || (steamIDs.Count == 0)) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(steamIDs));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -90,6 +91,7 @@ namespace ArchiSteamFarm {
|
||||
internal async Task AddGamesToRedeemInBackground(IOrderedDictionary games) {
|
||||
if ((games == null) || (games.Count == 0)) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(games));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -114,6 +116,7 @@ namespace ArchiSteamFarm {
|
||||
internal async Task AddIdlingBlacklistedAppIDs(IReadOnlyCollection<uint> appIDs) {
|
||||
if ((appIDs == null) || (appIDs.Count == 0)) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(appIDs));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -125,6 +128,7 @@ namespace ArchiSteamFarm {
|
||||
internal async Task AddIdlingPriorityAppIDs(IReadOnlyCollection<uint> appIDs) {
|
||||
if ((appIDs == null) || (appIDs.Count == 0)) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(appIDs));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -136,6 +140,7 @@ namespace ArchiSteamFarm {
|
||||
internal async Task CorrectMobileAuthenticatorDeviceID(string deviceID) {
|
||||
if (string.IsNullOrEmpty(deviceID) || (MobileAuthenticator == null)) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(deviceID) + " || " + nameof(MobileAuthenticator));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -147,6 +152,7 @@ namespace ArchiSteamFarm {
|
||||
internal static async Task<BotDatabase> CreateOrLoad(string filePath) {
|
||||
if (string.IsNullOrEmpty(filePath)) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(filePath));
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -160,15 +166,18 @@ namespace ArchiSteamFarm {
|
||||
botDatabase = JsonConvert.DeserializeObject<BotDatabase>(await RuntimeCompatibility.File.ReadAllTextAsync(filePath).ConfigureAwait(false));
|
||||
} catch (Exception e) {
|
||||
ASF.ArchiLogger.LogGenericException(e);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
if (botDatabase == null) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(botDatabase));
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
botDatabase.FilePath = filePath;
|
||||
|
||||
return botDatabase;
|
||||
}
|
||||
|
||||
@@ -190,6 +199,7 @@ namespace ArchiSteamFarm {
|
||||
internal bool IsBlacklistedFromIdling(uint appID) {
|
||||
if (appID == 0) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(appID));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -199,6 +209,7 @@ namespace ArchiSteamFarm {
|
||||
internal bool IsBlacklistedFromTrades(ulong steamID) {
|
||||
if (steamID == 0) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(steamID));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -208,6 +219,7 @@ namespace ArchiSteamFarm {
|
||||
internal bool IsPriorityIdling(uint appID) {
|
||||
if (appID == 0) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(appID));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -235,6 +247,7 @@ namespace ArchiSteamFarm {
|
||||
internal async Task RemoveBlacklistedFromTradesSteamIDs(IReadOnlyCollection<ulong> steamIDs) {
|
||||
if ((steamIDs == null) || (steamIDs.Count == 0)) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(steamIDs));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -246,6 +259,7 @@ namespace ArchiSteamFarm {
|
||||
internal async Task RemoveGameToRedeemInBackground(string key) {
|
||||
if (string.IsNullOrEmpty(key)) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(key));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -263,6 +277,7 @@ namespace ArchiSteamFarm {
|
||||
internal async Task RemoveIdlingBlacklistedAppIDs(IReadOnlyCollection<uint> appIDs) {
|
||||
if ((appIDs == null) || (appIDs.Count == 0)) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(appIDs));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -274,6 +289,7 @@ namespace ArchiSteamFarm {
|
||||
internal async Task RemoveIdlingPriorityAppIDs(IReadOnlyCollection<uint> appIDs) {
|
||||
if ((appIDs == null) || (appIDs.Count == 0)) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(appIDs));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -306,8 +322,10 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
string json = JsonConvert.SerializeObject(this);
|
||||
|
||||
if (string.IsNullOrEmpty(json)) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(json));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user