C# 7.0 syntax sugars

This commit is contained in:
Bruno Logerfo
2017-03-14 08:20:29 -03:00
parent 6c8a123b68
commit f8b2fcda7a
14 changed files with 62 additions and 150 deletions

View File

@@ -48,13 +48,7 @@ namespace ArchiSteamFarm {
private string LastNickname;
private bool ShouldSendHeartBeats;
internal Statistics(Bot bot) {
if (bot == null) {
throw new ArgumentNullException(nameof(bot));
}
Bot = bot;
}
internal Statistics(Bot bot) => Bot = bot ?? throw new ArgumentNullException(nameof(bot));
public void Dispose() => Semaphore.Dispose();