NadekoBot.Extensions should now be fully annotated with nullable reference types as well as many classes from NadekoBot.Common

This commit is contained in:
Kwoth
2021-12-28 10:44:00 +01:00
parent 0634470a8a
commit 59f5056035
543 changed files with 1895 additions and 1448 deletions
@@ -1,4 +1,5 @@
using NadekoBot.Common.Configs;
#nullable disable
using NadekoBot.Common.Configs;
using SixLabors.ImageSharp.PixelFormats;
namespace NadekoBot.Services;
@@ -35,4 +36,4 @@ public sealed class BotConfigService : ConfigServiceBase<BotConfig>
ModifyConfig(c => c.Version = 2);
}
}
}
}
@@ -1,4 +1,5 @@
using System.Globalization;
#nullable disable
using System.Globalization;
using SixLabors.ImageSharp.PixelFormats;
namespace NadekoBot.Services;
@@ -42,4 +43,4 @@ public static class ConfigPrinters
public static string Color(Rgba32 color)
=> ((uint) ((color.B << 0) | (color.G << 8) | (color.R << 16))).ToString("X6");
}
}
@@ -1,4 +1,5 @@
using System.Linq.Expressions;
#nullable disable
using System.Linq.Expressions;
using System.Reflection;
using NadekoBot.Common.Yml;
using NadekoBot.Common.Configs;
@@ -195,4 +196,4 @@ public abstract class ConfigServiceBase<TSettings> : IConfigService
Save();
PublishChange();
}
}
}
@@ -1,6 +1,7 @@
namespace NadekoBot.Services;
#nullable disable
namespace NadekoBot.Services;
public interface IConfigMigrator
{
public void EnsureMigrated();
}
}
@@ -1,4 +1,5 @@
namespace NadekoBot.Services;
#nullable disable
namespace NadekoBot.Services;
/// <summary>
/// Interface that all services which deal with configs should implement
@@ -39,4 +40,4 @@ public interface IConfigService
/// <param name="newValue">Value to set the property to</param>
/// <returns>Success</returns>
bool SetSetting(string prop, string newValue);
}
}
@@ -1,7 +1,8 @@
namespace NadekoBot.Services;
#nullable disable
namespace NadekoBot.Services;
/// <summary>
/// Delegate which describes a parser which can convert string input into given data type
/// </summary>
/// <typeparam name="TData">Data type to convert string to</typeparam>
public delegate bool SettingParser<TData>(string input, out TData output);
public delegate bool SettingParser<TData>(string input, out TData output);