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

View File

@@ -1,9 +1,13 @@
root = true root = true
# Remove the line below if you want to inherit .editorconfig settings from higher directories # Remove the line below if you want to inherit .editorconfig settings from higher directories
[obj/**]
generated_code = true
# C# files # C# files
[*.cs] [*.cs]
#### Core EditorConfig Options #### #### Core EditorConfig Options ####
# Indentation and spacing # Indentation and spacing
@@ -263,7 +267,7 @@ dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, int
dotnet_naming_symbols.non_field_members.required_modifiers = dotnet_naming_symbols.non_field_members.required_modifiers =
dotnet_naming_symbols.private_readonly_field.applicable_kinds = field dotnet_naming_symbols.private_readonly_field.applicable_kinds = field
dotnet_naming_symbols.private_readonly_field.applicable_accessibilities = private dotnet_naming_symbols.private_readonly_field.applicable_accessibilities = private, protected
dotnet_naming_symbols.private_readonly_field.required_modifiers = readonly dotnet_naming_symbols.private_readonly_field.required_modifiers = readonly
dotnet_naming_symbols.private_field.applicable_kinds = field dotnet_naming_symbols.private_field.applicable_kinds = field
@@ -327,7 +331,7 @@ resharper_wrap_before_invocation_rpar = false
resharper_csharp_wrap_after_declaration_lpar = true resharper_csharp_wrap_after_declaration_lpar = true
resharper_csharp_wrap_before_invocation_rpar = true resharper_csharp_wrap_before_invocation_rpar = true
resharper_csharp_wrap_parameters_style = chop_if_long resharper_csharp_wrap_parameters_style = chop_if_long
resharper_force_chop_compound_if_expression = true resharper_force_chop_compound_if_expression = false
resharper_keep_existing_linebreaks = false resharper_keep_existing_linebreaks = false
resharper_max_formal_parameters_on_line = 3 resharper_max_formal_parameters_on_line = 3
resharper_wrap_chained_binary_expressions = chop_if_long resharper_wrap_chained_binary_expressions = chop_if_long

View File

@@ -1,4 +1,5 @@
using Microsoft.Extensions.DependencyInjection; #nullable disable
using Microsoft.Extensions.DependencyInjection;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
using System.Collections.Immutable; using System.Collections.Immutable;
using System.Diagnostics; using System.Diagnostics;
@@ -54,6 +55,7 @@ public sealed class Bot
AlwaysDownloadUsers = false, AlwaysDownloadUsers = false,
AlwaysResolveStickers = false, AlwaysResolveStickers = false,
AlwaysDownloadDefaultStickers = false, AlwaysDownloadDefaultStickers = false,
GatewayIntents = GatewayIntents.All,
}); });
_commandService = new(new() _commandService = new(new()

View File

@@ -1,4 +1,5 @@
namespace NadekoBot.Common; #nullable disable
namespace NadekoBot.Common;
public enum AddRemove public enum AddRemove
{ {

View File

@@ -1,4 +1,5 @@
using System.Runtime.CompilerServices; #nullable disable
using System.Runtime.CompilerServices;
namespace NadekoBot.Common; namespace NadekoBot.Common;

View File

@@ -1,4 +1,4 @@
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
namespace NadekoBot.Common.Attributes; namespace NadekoBot.Common.Attributes;

View File

@@ -1,4 +1,4 @@
namespace NadekoBot.Common.Attributes; namespace NadekoBot.Common.Attributes;
public static class CommandNameLoadHelper public static class CommandNameLoadHelper
{ {

View File

@@ -1,4 +1,4 @@
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
namespace NadekoBot.Common.Attributes; namespace NadekoBot.Common.Attributes;

View File

@@ -1,4 +1,4 @@
namespace NadekoBot.Common.Attributes; namespace NadekoBot.Common.Attributes;
[AttributeUsage(AttributeTargets.Class)] [AttributeUsage(AttributeTargets.Class)]
internal sealed class NadekoModuleAttribute : GroupAttribute internal sealed class NadekoModuleAttribute : GroupAttribute

View File

@@ -1,4 +1,4 @@
namespace NadekoBot.Common.Attributes; namespace NadekoBot.Common.Attributes;
[AttributeUsage(AttributeTargets.Method)] [AttributeUsage(AttributeTargets.Method)]
public sealed class NadekoOptionsAttribute : Attribute public sealed class NadekoOptionsAttribute : Attribute

View File

@@ -1,4 +1,4 @@
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
namespace NadekoBot.Common.Attributes; namespace NadekoBot.Common.Attributes;

View File

@@ -1,4 +1,4 @@
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
namespace NadekoBot.Common.Attributes; namespace NadekoBot.Common.Attributes;

View File

@@ -1,9 +1,9 @@
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using NadekoBot.Modules.Administration.Services; using NadekoBot.Modules.Administration.Services;
namespace Discord; namespace Discord;
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] [AttributeUsage(AttributeTargets.Method)]
public class UserPermAttribute : RequireUserPermissionAttribute public class UserPermAttribute : RequireUserPermissionAttribute
{ {
public override Task<PreconditionResult> CheckPermissionsAsync( public override Task<PreconditionResult> CheckPermissionsAsync(

View File

@@ -1,4 +1,5 @@
using Newtonsoft.Json; #nullable disable
using Newtonsoft.Json;
namespace NadekoBot.Common; namespace NadekoBot.Common;

View File

@@ -1,4 +1,5 @@
// License MIT #nullable disable
// License MIT
// Source: https://github.com/i3arnon/ConcurrentHashSet // Source: https://github.com/i3arnon/ConcurrentHashSet
using System.Diagnostics; using System.Diagnostics;

View File

@@ -1,4 +1,5 @@
using System.Collections; #nullable disable
using System.Collections;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
namespace NadekoBot.Common.Collections; namespace NadekoBot.Common.Collections;

View File

@@ -1,4 +1,5 @@
namespace NadekoBot.Common; #nullable disable
namespace NadekoBot.Common;
public class CommandData public class CommandData
{ {

View File

@@ -1,4 +1,5 @@
using System.Globalization; #nullable disable
using System.Globalization;
using Cloneable; using Cloneable;
using NadekoBot.Common.Yml; using NadekoBot.Common.Yml;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

View File

@@ -1,4 +1,4 @@
namespace NadekoBot.Common.Configs; namespace NadekoBot.Common.Configs;
/// <summary> /// <summary>
/// Base interface for available config serializers /// Base interface for available config serializers
@@ -8,7 +8,8 @@ public interface IConfigSeria
/// <summary> /// <summary>
/// Serialize the object to string /// Serialize the object to string
/// </summary> /// </summary>
public string Serialize<T>(T obj); public string Serialize<T>(T obj)
where T: notnull;
/// <summary> /// <summary>
/// Deserialize string data into an object of the specified type /// Deserialize string data into an object of the specified type

View File

@@ -1,4 +1,5 @@
using NadekoBot.Common.Yml; #nullable disable
using NadekoBot.Common.Yml;
namespace NadekoBot.Common; namespace NadekoBot.Common;

View File

@@ -1,4 +1,5 @@
namespace NadekoBot.Common; #nullable disable
namespace NadekoBot.Common;
public class DownloadTracker : INService public class DownloadTracker : INService
{ {

View File

@@ -1,4 +1,5 @@
namespace NadekoBot.Common; #nullable disable
namespace NadekoBot.Common;
public static class Helpers public static class Helpers
{ {

View File

@@ -1,4 +1,5 @@
namespace NadekoBot; #nullable disable
namespace NadekoBot;
public interface IBotCredentials public interface IBotCredentials
{ {

View File

@@ -1,4 +1,5 @@
namespace NadekoBot.Common; #nullable disable
namespace NadekoBot.Common;
public interface ICloneable<T> public interface ICloneable<T>
where T : new() where T : new()

View File

@@ -1,4 +1,5 @@
namespace NadekoBot; #nullable disable
namespace NadekoBot;
public interface IEmbedBuilder public interface IEmbedBuilder
{ {

View File

@@ -1,4 +1,5 @@
namespace NadekoBot.Common; #nullable disable
namespace NadekoBot.Common;
public interface INadekoCommandOptions public interface INadekoCommandOptions
{ {

View File

@@ -1,4 +1,5 @@
namespace NadekoBot.Common; #nullable disable
namespace NadekoBot.Common;
public interface IPlaceholderProvider public interface IPlaceholderProvider
{ {

View File

@@ -1,4 +1,5 @@
using NadekoBot.Common.Yml; #nullable disable
using NadekoBot.Common.Yml;
namespace NadekoBot.Common; namespace NadekoBot.Common;

View File

@@ -1,4 +1,4 @@
using System.Globalization; using System.Globalization;
using System.Text.Json; using System.Text.Json;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;

View File

@@ -1,4 +1,4 @@
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
using System.Text.Json; using System.Text.Json;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;

View File

@@ -1,4 +1,5 @@
using System.Runtime.CompilerServices; #nullable disable
using System.Runtime.CompilerServices;
namespace NadekoBot.Common; namespace NadekoBot.Common;

View File

@@ -1,4 +1,5 @@
using CommandLine; #nullable disable
using CommandLine;
namespace NadekoBot.Common; namespace NadekoBot.Common;

View File

@@ -1,4 +1,5 @@
using System.Net; #nullable disable
using System.Net;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
namespace NadekoBot.Common; namespace NadekoBot.Common;

View File

@@ -1,4 +1,4 @@
namespace NadekoBot.Common.ModuleBehaviors; namespace NadekoBot.Common.ModuleBehaviors;
/// <summary> /// <summary>
/// Implemented by modules which block execution before anything is executed /// Implemented by modules which block execution before anything is executed

View File

@@ -1,4 +1,4 @@
namespace NadekoBot.Common.ModuleBehaviors; namespace NadekoBot.Common.ModuleBehaviors;
public interface IInputTransformer public interface IInputTransformer
{ {

View File

@@ -1,4 +1,4 @@
namespace NadekoBot.Common.ModuleBehaviors; namespace NadekoBot.Common.ModuleBehaviors;
public interface ILateBlocker public interface ILateBlocker
{ {

View File

@@ -1,4 +1,4 @@
namespace NadekoBot.Common.ModuleBehaviors; namespace NadekoBot.Common.ModuleBehaviors;
/// <summary> /// <summary>
/// Last thing to be executed, won't stop further executions /// Last thing to be executed, won't stop further executions

View File

@@ -1,4 +1,4 @@
namespace NadekoBot.Common.ModuleBehaviors; namespace NadekoBot.Common.ModuleBehaviors;
/// <summary> /// <summary>
/// All services which need to execute something after /// All services which need to execute something after

View File

@@ -1,4 +1,5 @@
using System.Globalization; #nullable disable
using System.Globalization;
// ReSharper disable InconsistentNaming // ReSharper disable InconsistentNaming
namespace NadekoBot.Modules; namespace NadekoBot.Modules;

View File

@@ -1,4 +1,5 @@
using System.Security.Cryptography; #nullable disable
using System.Security.Cryptography;
namespace NadekoBot.Common; namespace NadekoBot.Common;

View File

@@ -1,4 +1,5 @@
using System.Diagnostics.CodeAnalysis; #nullable disable
using System.Diagnostics.CodeAnalysis;
namespace NadekoBot.Common; namespace NadekoBot.Common;

View File

@@ -1,3 +1,4 @@
#nullable disable
namespace NadekoBot.Common; namespace NadekoBot.Common;
public class OldImageUrls public class OldImageUrls

View File

@@ -1,4 +1,5 @@
using CommandLine; #nullable disable
using CommandLine;
namespace NadekoBot.Common; namespace NadekoBot.Common;

View File

@@ -1,4 +1,5 @@
namespace NadekoBot.Common; #nullable disable
namespace NadekoBot.Common;
public class OsuMapData public class OsuMapData
{ {

View File

@@ -1,4 +1,5 @@
using Newtonsoft.Json; #nullable disable
using Newtonsoft.Json;
namespace NadekoBot.Common; namespace NadekoBot.Common;

View File

@@ -1,4 +1,5 @@
namespace NadekoBot.Common; #nullable disable
namespace NadekoBot.Common;
public static class PlatformHelper public static class PlatformHelper
{ {

View File

@@ -1,4 +1,5 @@
namespace NadekoBot.Common.Pokemon; #nullable disable
namespace NadekoBot.Common.Pokemon;
public class PokemonNameId public class PokemonNameId
{ {

View File

@@ -1,4 +1,5 @@
using Newtonsoft.Json; #nullable disable
using Newtonsoft.Json;
namespace NadekoBot.Common.Pokemon; namespace NadekoBot.Common.Pokemon;

View File

@@ -1,4 +1,5 @@
namespace NadekoBot.Common.Pokemon; #nullable disable
namespace NadekoBot.Common.Pokemon;
public class SearchPokemonAbility public class SearchPokemonAbility
{ {

View File

@@ -1,13 +1,13 @@
namespace NadekoBot.Common; namespace NadekoBot.Common;
public class EventPubSub : IPubSub public class EventPubSub : IPubSub
{ {
private readonly Dictionary<string, Dictionary<Delegate, List<Func<object, ValueTask>>>> _actions = new(); private readonly Dictionary<string, Dictionary<Delegate, List<Func<object?, ValueTask>>>> _actions = new();
private readonly object _locker = new(); private readonly object _locker = new();
public Task Sub<TData>(in TypedKey<TData> key, Func<TData, ValueTask> action) public Task Sub<TData>(in TypedKey<TData> key, Func<TData?, ValueTask> action)
{ {
Func<object, ValueTask> localAction = obj => action((TData)obj); Func<object?, ValueTask> localAction = obj => action((TData?)obj);
lock (_locker) lock (_locker)
{ {
if (!_actions.TryGetValue(key.Key, out var keyActions)) if (!_actions.TryGetValue(key.Key, out var keyActions))

View File

@@ -1,7 +1,7 @@
namespace NadekoBot.Common; namespace NadekoBot.Common;
public interface IPubSub public interface IPubSub
{ {
public Task Pub<TData>(in TypedKey<TData> key, TData data); public Task Pub<TData>(in TypedKey<TData> key, TData data);
public Task Sub<TData>(in TypedKey<TData> key, Func<TData, ValueTask> action); public Task Sub<TData>(in TypedKey<TData> key, Func<TData?, ValueTask> action);
} }

View File

@@ -1,7 +1,7 @@
namespace NadekoBot.Common; namespace NadekoBot.Common;
public interface ISeria public interface ISeria
{ {
byte[] Serialize<T>(T data); byte[] Serialize<T>(T data);
T Deserialize<T>(byte[] data); T? Deserialize<T>(byte[]? data);
} }

View File

@@ -1,4 +1,4 @@
using System.Text.Json; using System.Text.Json;
using NadekoBot.Common.JsonConverters; using NadekoBot.Common.JsonConverters;
namespace NadekoBot.Common; namespace NadekoBot.Common;
@@ -13,7 +13,7 @@ public class JsonSeria : ISeria
public byte[] Serialize<T>(T data) public byte[] Serialize<T>(T data)
=> JsonSerializer.SerializeToUtf8Bytes(data, _serializerOptions); => JsonSerializer.SerializeToUtf8Bytes(data, _serializerOptions);
public T Deserialize<T>(byte[] data) public T? Deserialize<T>(byte[]? data)
{ {
if (data is null) if (data is null)
return default; return default;

View File

@@ -1,4 +1,4 @@
using StackExchange.Redis; using StackExchange.Redis;
namespace NadekoBot.Common; namespace NadekoBot.Common;
@@ -22,7 +22,7 @@ public sealed class RedisPubSub : IPubSub
.PublishAsync($"{_creds.RedisKey()}:{key.Key}", serialized, CommandFlags.FireAndForget); .PublishAsync($"{_creds.RedisKey()}:{key.Key}", serialized, CommandFlags.FireAndForget);
} }
public Task Sub<TData>(in TypedKey<TData> key, Func<TData, ValueTask> action) public Task Sub<TData>(in TypedKey<TData> key, Func<TData?, ValueTask> action)
{ {
var eventName = key.Key; var eventName = key.Key;

View File

@@ -1,4 +1,4 @@
namespace NadekoBot.Common; namespace NadekoBot.Common;
public readonly struct TypedKey<TData> public readonly struct TypedKey<TData>
{ {
@@ -19,7 +19,7 @@ public readonly struct TypedKey<TData>
public static bool operator !=(in TypedKey<TData> left, in TypedKey<TData> right) public static bool operator !=(in TypedKey<TData> left, in TypedKey<TData> right)
=> !(left == right); => !(left == right);
public override bool Equals(object obj) public override bool Equals(object? obj)
=> obj is TypedKey<TData> o && o == this; => obj is TypedKey<TData> o && o == this;
public override int GetHashCode() public override int GetHashCode()

View File

@@ -22,6 +22,7 @@ public class YamlSeria : IConfigSeria
} }
public string Serialize<T>(T obj) public string Serialize<T>(T obj)
where T: notnull
{ {
var escapedOutput = _serializer.Serialize(obj); var escapedOutput = _serializer.Serialize(obj);
var output = _codePointRegex.Replace(escapedOutput, var output = _codePointRegex.Replace(escapedOutput,

View File

@@ -1,4 +1,5 @@
using NadekoBot.Modules.Administration.Services; #nullable disable
using NadekoBot.Modules.Administration.Services;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
namespace NadekoBot.Common; namespace NadekoBot.Common;
@@ -56,6 +57,7 @@ public class ReplacementBuilder
public ReplacementBuilder WithServer(DiscordSocketClient client, SocketGuild g) public ReplacementBuilder WithServer(DiscordSocketClient client, SocketGuild g)
{ {
_reps.TryAdd("%server%", () => g is null ? "DM" : g.Name);
_reps.TryAdd("%server.id%", () => g is null ? "DM" : g.Id.ToString()); _reps.TryAdd("%server.id%", () => g is null ? "DM" : g.Id.ToString());
_reps.TryAdd("%server.name%", () => g is null ? "DM" : g.Name); _reps.TryAdd("%server.name%", () => g is null ? "DM" : g.Name);
_reps.TryAdd("%server.members%", () => g is { } sg ? sg.MemberCount.ToString() : "?"); _reps.TryAdd("%server.members%", () => g is { } sg ? sg.MemberCount.ToString() : "?");
@@ -97,6 +99,7 @@ public class ReplacementBuilder
public ReplacementBuilder WithManyUsers(IEnumerable<IUser> users) public ReplacementBuilder WithManyUsers(IEnumerable<IUser> users)
{ {
_reps.TryAdd("%user%", () => string.Join(" ", users.Select(user => user.Mention)));
_reps.TryAdd("%user.mention%", () => string.Join(" ", users.Select(user => user.Mention))); _reps.TryAdd("%user.mention%", () => string.Join(" ", users.Select(user => user.Mention)));
_reps.TryAdd("%user.fullname%", () => string.Join(" ", users.Select(user => user.ToString()))); _reps.TryAdd("%user.fullname%", () => string.Join(" ", users.Select(user => user.ToString())));
_reps.TryAdd("%user.name%", () => string.Join(" ", users.Select(user => user.Username))); _reps.TryAdd("%user.name%", () => string.Join(" ", users.Select(user => user.Username)));

View File

@@ -1,4 +1,5 @@
using System.Text.RegularExpressions; #nullable disable
using System.Text.RegularExpressions;
namespace NadekoBot.Common; namespace NadekoBot.Common;

View File

@@ -1,4 +1,5 @@
using Newtonsoft.Json; #nullable disable
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization; using Newtonsoft.Json.Serialization;
namespace NadekoBot.Common; namespace NadekoBot.Common;

View File

@@ -1,4 +1,5 @@
namespace NadekoBot.Common; #nullable disable
namespace NadekoBot.Common;
public struct ShmartNumber : IEquatable<ShmartNumber> public struct ShmartNumber : IEquatable<ShmartNumber>
{ {

View File

@@ -1,4 +1,5 @@
namespace NadekoBot; #nullable disable
namespace NadekoBot;
public sealed record SmartEmbedText : SmartText public sealed record SmartEmbedText : SmartText
{ {

View File

@@ -1,4 +1,5 @@
namespace NadekoBot; #nullable disable
namespace NadekoBot;
public sealed record SmartPlainText : SmartText public sealed record SmartPlainText : SmartText
{ {

View File

@@ -1,4 +1,5 @@
using Newtonsoft.Json; #nullable disable
using Newtonsoft.Json;
namespace NadekoBot; namespace NadekoBot;

View File

@@ -1,4 +1,5 @@
using Newtonsoft.Json; #nullable disable
using Newtonsoft.Json;
namespace NadekoBot; namespace NadekoBot;

View File

@@ -1,4 +1,5 @@
namespace NadekoBot; #nullable disable
namespace NadekoBot;
public class SmartTextEmbedField public class SmartTextEmbedField
{ {

View File

@@ -1,4 +1,5 @@
using Newtonsoft.Json; #nullable disable
using Newtonsoft.Json;
namespace NadekoBot; namespace NadekoBot;

View File

@@ -1,4 +1,5 @@
namespace NadekoBot.Common; #nullable disable
namespace NadekoBot.Common;
public sealed class ReactionEventWrapper : IDisposable public sealed class ReactionEventWrapper : IDisposable
{ {

View File

@@ -1,4 +1,5 @@
using NadekoBot.Modules.CustomReactions.Services; #nullable disable
using NadekoBot.Modules.CustomReactions.Services;
namespace NadekoBot.Common.TypeReaders; namespace NadekoBot.Common.TypeReaders;

View File

@@ -1,4 +1,5 @@
namespace NadekoBot.Common.TypeReaders; #nullable disable
namespace NadekoBot.Common.TypeReaders;
public sealed class EmoteTypeReader : NadekoTypeReader<Emote> public sealed class EmoteTypeReader : NadekoTypeReader<Emote>
{ {

View File

@@ -1,4 +1,5 @@
using NadekoBot.Modules.Administration.Services; #nullable disable
using NadekoBot.Modules.Administration.Services;
namespace NadekoBot.Common.TypeReaders; namespace NadekoBot.Common.TypeReaders;

View File

@@ -1,4 +1,5 @@
namespace NadekoBot.Common.TypeReaders; #nullable disable
namespace NadekoBot.Common.TypeReaders;
public sealed class GuildTypeReader : NadekoTypeReader<IGuild> public sealed class GuildTypeReader : NadekoTypeReader<IGuild>
{ {

View File

@@ -1,4 +1,5 @@
namespace NadekoBot.Common.TypeReaders; #nullable disable
namespace NadekoBot.Common.TypeReaders;
public sealed class KwumTypeReader : NadekoTypeReader<kwum> public sealed class KwumTypeReader : NadekoTypeReader<kwum>
{ {

View File

@@ -1,4 +1,5 @@
namespace NadekoBot.Common.TypeReaders.Models; #nullable disable
namespace NadekoBot.Common.TypeReaders.Models;
public class PermissionAction public class PermissionAction
{ {

View File

@@ -1,4 +1,5 @@
using System.Text.RegularExpressions; #nullable disable
using System.Text.RegularExpressions;
namespace NadekoBot.Common.TypeReaders.Models; namespace NadekoBot.Common.TypeReaders.Models;

View File

@@ -1,4 +1,5 @@
namespace NadekoBot.Common.TypeReaders; #nullable disable
namespace NadekoBot.Common.TypeReaders;
public sealed class ModuleTypeReader : NadekoTypeReader<ModuleInfo> public sealed class ModuleTypeReader : NadekoTypeReader<ModuleInfo>
{ {

View File

@@ -1,4 +1,5 @@
namespace NadekoBot.Common.TypeReaders; #nullable disable
namespace NadekoBot.Common.TypeReaders;
[MeansImplicitUse(ImplicitUseTargetFlags.Default | ImplicitUseTargetFlags.WithInheritors )] [MeansImplicitUse(ImplicitUseTargetFlags.Default | ImplicitUseTargetFlags.WithInheritors )]
public abstract class NadekoTypeReader<T> : TypeReader public abstract class NadekoTypeReader<T> : TypeReader

View File

@@ -1,4 +1,5 @@
using NadekoBot.Common.TypeReaders.Models; #nullable disable
using NadekoBot.Common.TypeReaders.Models;
namespace NadekoBot.Common.TypeReaders; namespace NadekoBot.Common.TypeReaders;

View File

@@ -1,4 +1,5 @@
namespace NadekoBot.Common.TypeReaders; #nullable disable
namespace NadekoBot.Common.TypeReaders;
using Color = SixLabors.ImageSharp.Color; using Color = SixLabors.ImageSharp.Color;
public sealed class Rgba32TypeReader : NadekoTypeReader<Color> public sealed class Rgba32TypeReader : NadekoTypeReader<Color>

View File

@@ -1,4 +1,5 @@
using System.Text.RegularExpressions; #nullable disable
using System.Text.RegularExpressions;
using NadekoBot.Db; using NadekoBot.Db;
using NadekoBot.Modules.Gambling.Services; using NadekoBot.Modules.Gambling.Services;

View File

@@ -1,4 +1,5 @@
using NadekoBot.Common.TypeReaders.Models; #nullable disable
using NadekoBot.Common.TypeReaders.Models;
namespace NadekoBot.Common.TypeReaders; namespace NadekoBot.Common.TypeReaders;

View File

@@ -1,4 +1,5 @@
namespace NadekoBot.Common.Yml; #nullable disable
namespace NadekoBot.Common.Yml;
public class CommentAttribute : Attribute public class CommentAttribute : Attribute
{ {

View File

@@ -1,4 +1,5 @@
using YamlDotNet.Core; #nullable disable
using YamlDotNet.Core;
using YamlDotNet.Serialization; using YamlDotNet.Serialization;
using YamlDotNet.Serialization.TypeInspectors; using YamlDotNet.Serialization.TypeInspectors;

View File

@@ -1,4 +1,5 @@
using YamlDotNet.Core; #nullable disable
using YamlDotNet.Core;
using YamlDotNet.Serialization; using YamlDotNet.Serialization;
namespace NadekoBot.Common.Yml; namespace NadekoBot.Common.Yml;

View File

@@ -1,4 +1,5 @@
using YamlDotNet.Core; #nullable disable
using YamlDotNet.Core;
using YamlDotNet.Core.Events; using YamlDotNet.Core.Events;
using YamlDotNet.Serialization; using YamlDotNet.Serialization;
using YamlDotNet.Serialization.ObjectGraphVisitors; using YamlDotNet.Serialization.ObjectGraphVisitors;

View File

@@ -1,4 +1,5 @@
using YamlDotNet.Core; #nullable disable
using YamlDotNet.Core;
using YamlDotNet.Serialization; using YamlDotNet.Serialization;
using YamlDotNet.Serialization.EventEmitters; using YamlDotNet.Serialization.EventEmitters;

View File

@@ -1,4 +1,5 @@
using System.Globalization; #nullable disable
using System.Globalization;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
using YamlDotNet.Core; using YamlDotNet.Core;
using YamlDotNet.Core.Events; using YamlDotNet.Core.Events;

View File

@@ -1,4 +1,5 @@
using YamlDotNet.Core; #nullable disable
using YamlDotNet.Core;
using YamlDotNet.Core.Events; using YamlDotNet.Core.Events;
using YamlDotNet.Serialization; using YamlDotNet.Serialization;

View File

@@ -1,4 +1,5 @@
using YamlDotNet.Serialization; #nullable disable
using YamlDotNet.Serialization;
namespace NadekoBot.Common.Yml; namespace NadekoBot.Common.Yml;

View File

@@ -1,4 +1,5 @@
namespace NadekoBot.Common.Yml; #nullable disable
namespace NadekoBot.Common.Yml;
public class YamlHelper public class YamlHelper
{ {

View File

@@ -1,4 +1,5 @@
using Microsoft.EntityFrameworkCore; #nullable disable
using Microsoft.EntityFrameworkCore;
using NadekoBot.Db.Models; using NadekoBot.Db.Models;
namespace NadekoBot.Db; namespace NadekoBot.Db;

View File

@@ -1,4 +1,5 @@
using Microsoft.EntityFrameworkCore; #nullable disable
using Microsoft.EntityFrameworkCore;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
namespace NadekoBot.Db; namespace NadekoBot.Db;

View File

@@ -1,4 +1,5 @@
using Microsoft.EntityFrameworkCore; #nullable disable
using Microsoft.EntityFrameworkCore;
using LinqToDB; using LinqToDB;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;

View File

@@ -1,4 +1,5 @@
using Microsoft.EntityFrameworkCore; #nullable disable
using Microsoft.EntityFrameworkCore;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
namespace NadekoBot.Db; namespace NadekoBot.Db;

View File

@@ -1,4 +1,5 @@
using NadekoBot.Db.Models; #nullable disable
using NadekoBot.Db.Models;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using LinqToDB; using LinqToDB;
using LinqToDB.EntityFrameworkCore; using LinqToDB.EntityFrameworkCore;

View File

@@ -1,4 +1,5 @@
using NadekoBot.Services.Database.Models; #nullable disable
using NadekoBot.Services.Database.Models;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using NadekoBot.Services.Database; using NadekoBot.Services.Database;
using NadekoBot.Db.Models; using NadekoBot.Db.Models;

View File

@@ -1,4 +1,5 @@
using Microsoft.EntityFrameworkCore; #nullable disable
using Microsoft.EntityFrameworkCore;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
namespace NadekoBot.Db; namespace NadekoBot.Db;

View File

@@ -1,4 +1,5 @@
using Microsoft.EntityFrameworkCore; #nullable disable
using Microsoft.EntityFrameworkCore;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
namespace NadekoBot.Db; namespace NadekoBot.Db;

View File

@@ -1,4 +1,5 @@
using Microsoft.EntityFrameworkCore; #nullable disable
using Microsoft.EntityFrameworkCore;
using NadekoBot.Services.Database; using NadekoBot.Services.Database;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;

View File

@@ -1,3 +1,4 @@
#nullable disable
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;

View File

@@ -1,4 +1,5 @@
using NadekoBot.Services.Database.Models; #nullable disable
using NadekoBot.Services.Database.Models;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace NadekoBot.Db; namespace NadekoBot.Db;

View File

@@ -1,4 +1,5 @@
using NadekoBot.Services.Database.Models; #nullable disable
using NadekoBot.Services.Database.Models;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace NadekoBot.Db; namespace NadekoBot.Db;

Some files were not shown because too many files have changed in this diff Show More