Gigantic code review (with ReSharper)

This commit is contained in:
JustArchi
2016-05-13 06:32:42 +02:00
parent 6f93139a18
commit b8faca2517
34 changed files with 935 additions and 888 deletions

View File

@@ -26,9 +26,11 @@ using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.IO;
namespace ConfigGenerator {
[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global"), SuppressMessage("ReSharper", "CollectionNeverQueried.Global"), SuppressMessage("ReSharper", "MemberCanBePrivate.Global"), SuppressMessage("ReSharper", "UnusedMember.Global")]
internal sealed class BotConfig : ASFConfig {
[JsonProperty(Required = Required.DisallowNull)]
public bool Enabled { get; set; } = false;
@@ -39,8 +41,7 @@ namespace ConfigGenerator {
[JsonProperty]
public string SteamLogin { get; set; } = null;
[JsonProperty]
[PasswordPropertyText(true)]
[JsonProperty, PasswordPropertyText(true)]
public string SteamPassword { get; set; } = null;
[JsonProperty]
@@ -130,11 +131,12 @@ namespace ConfigGenerator {
}
// This constructor is used only by deserializer
// ReSharper disable once UnusedMember.Local
private BotConfig() { }
private BotConfig(string filePath) : base(filePath) {
if (string.IsNullOrEmpty(filePath)) {
throw new ArgumentNullException("filePath");
throw new ArgumentNullException(nameof(filePath));
}
GamesPlayedWhileIdle.Add(0);