Code review according to Jeffrey Richter

> The pattern is to take the basest class or interface possible for your arguments and return the most specific class or interface possible for your return types. This gives your callers the most flexibility in passing in types to your methods and the most opportunities to cast/reuse the return values.
This commit is contained in:
JustArchi
2017-11-16 22:10:11 +01:00
parent 216bf4b486
commit 8019cdcbb4
14 changed files with 93 additions and 56 deletions

View File

@@ -192,7 +192,7 @@ namespace ArchiSteamFarm {
return result;
}
internal async Task<bool> HandleConfirmations(HashSet<Confirmation> confirmations, bool accept) {
internal async Task<bool> HandleConfirmations(IReadOnlyCollection<Confirmation> confirmations, bool accept) {
if ((confirmations == null) || (confirmations.Count == 0)) {
Bot.ArchiLogger.LogNullError(nameof(confirmations));
return false;