Prefer flags over comments

This commit is contained in:
JustArchi
2016-05-13 19:20:24 +02:00
parent 20038e8c86
commit 622f060575
13 changed files with 33 additions and 37 deletions

View File

@@ -130,8 +130,7 @@ namespace ConfigGenerator {
return botConfig;
}
// This constructor is used only by deserializer
// ReSharper disable once UnusedMember.Local
[SuppressMessage("ReSharper", "UnusedMember.Local")]
private BotConfig() { }
private BotConfig(string filePath) : base(filePath) {

View File

@@ -22,13 +22,15 @@
*/
using System.Diagnostics.CodeAnalysis;
namespace ConfigGenerator {
internal static class Debugging {
#if DEBUG
// ReSharper disable once ConvertToConstant.Global
[SuppressMessage("ReSharper", "ConvertToConstant.Global")]
internal static readonly bool IsDebugBuild = true;
#else
// ReSharper disable once ConvertToConstant.Global
[SuppressMessage("ReSharper", "ConvertToConstant.Global")]
internal static readonly bool IsDebugBuild = false;
#endif
}

View File

@@ -173,7 +173,7 @@ namespace ConfigGenerator {
return globalConfig;
}
// ReSharper disable once UnusedMember.Local
[SuppressMessage("ReSharper", "UnusedMember.Local")]
private GlobalConfig() { }
private GlobalConfig(string filePath) : base(filePath) {

View File

@@ -37,7 +37,7 @@ namespace ConfigGenerator {
MessageBox.Show(message, Resources.Information, MessageBoxButtons.OK, MessageBoxIcon.Information);
}
internal static void LogGenericError(string message, [CallerMemberName] string previousMethodName = "") {
internal static void LogGenericError(string message, [CallerMemberName] string previousMethodName = null) {
if (string.IsNullOrEmpty(message)) {
return;
}
@@ -45,7 +45,7 @@ namespace ConfigGenerator {
MessageBox.Show(previousMethodName + @"() " + message, Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
internal static void LogGenericException(Exception exception, [CallerMemberName] string previousMethodName = "") {
internal static void LogGenericException(Exception exception, [CallerMemberName] string previousMethodName = null) {
while (true) {
if (exception == null) {
return;
@@ -62,7 +62,7 @@ namespace ConfigGenerator {
}
}
internal static void LogGenericWarning(string message, [CallerMemberName] string previousMethodName = "") {
internal static void LogGenericWarning(string message, [CallerMemberName] string previousMethodName = null) {
if (string.IsNullOrEmpty(message)) {
return;
}