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,4 +1,5 @@
namespace NadekoBot.Common.Yml;
#nullable disable
namespace NadekoBot.Common.Yml;
public class CommentAttribute : Attribute
{
@@ -6,4 +7,4 @@ public class CommentAttribute : Attribute
public CommentAttribute(string comment)
=> Comment = comment;
}
}

View File

@@ -1,4 +1,5 @@
using YamlDotNet.Core;
#nullable disable
using YamlDotNet.Core;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.TypeInspectors;
@@ -61,4 +62,4 @@ public class CommentGatheringTypeInspector : TypeInspectorSkeleton
: baseDescriptor.Read(target);
}
}
}
}

View File

@@ -1,4 +1,5 @@
using YamlDotNet.Core;
#nullable disable
using YamlDotNet.Core;
using YamlDotNet.Serialization;
namespace NadekoBot.Common.Yml;
@@ -26,4 +27,4 @@ public sealed class CommentsObjectDescriptor : IObjectDescriptor
public ScalarStyle ScalarStyle
=> innerDescriptor.ScalarStyle;
}
}

View File

@@ -1,4 +1,5 @@
using YamlDotNet.Core;
#nullable disable
using YamlDotNet.Core;
using YamlDotNet.Core.Events;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.ObjectGraphVisitors;
@@ -22,4 +23,4 @@ public class CommentsObjectGraphVisitor : ChainedObjectGraphVisitor
return base.EnterMapping(key, value, context);
}
}
}

View File

@@ -1,4 +1,5 @@
using YamlDotNet.Core;
#nullable disable
using YamlDotNet.Core;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.EventEmitters;
@@ -26,4 +27,4 @@ public class MultilineScalarFlowStyleEmitter : ChainedEventEmitter
nextEmitter.Emit(eventInfo, emitter);
}
}
}

View File

@@ -1,4 +1,5 @@
using System.Globalization;
#nullable disable
using System.Globalization;
using SixLabors.ImageSharp.PixelFormats;
using YamlDotNet.Core;
using YamlDotNet.Core.Events;
@@ -43,4 +44,4 @@ public class CultureInfoConverter : IYamlTypeConverter
var ci = (CultureInfo)value;
emitter.Emit(new Scalar(ci.Name));
}
}
}

View File

@@ -1,4 +1,5 @@
using YamlDotNet.Core;
#nullable disable
using YamlDotNet.Core;
using YamlDotNet.Core.Events;
using YamlDotNet.Serialization;
@@ -21,4 +22,4 @@ public class UriConverter : IYamlTypeConverter
var uri = (Uri)value;
emitter.Emit(new Scalar(uri.ToString()));
}
}
}

View File

@@ -1,4 +1,5 @@
using YamlDotNet.Serialization;
#nullable disable
using YamlDotNet.Serialization;
namespace NadekoBot.Common.Yml;
@@ -23,4 +24,4 @@ public class Yaml
.WithTypeConverter(new UriConverter())
.IgnoreUnmatchedProperties()
.Build();
}
}

View File

@@ -1,4 +1,5 @@
namespace NadekoBot.Common.Yml;
#nullable disable
namespace NadekoBot.Common.Yml;
public class YamlHelper
{
@@ -52,4 +53,4 @@ public class YamlHelper
return c - 'a' + 10;
}
}
}