mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-11-04 16:44:28 -05:00
Kotz's editorconfig styles slightly modified. Target typed new usage. Brackets in expressions used for clarity.
This commit is contained in:
@@ -2,9 +2,8 @@
|
||||
|
||||
public class EventPubSub : IPubSub
|
||||
{
|
||||
private readonly Dictionary<string, Dictionary<Delegate, List<Func<object, ValueTask>>>> _actions
|
||||
= new Dictionary<string, Dictionary<Delegate, List<Func<object, ValueTask>>>>();
|
||||
private readonly object locker = new object();
|
||||
private readonly Dictionary<string, Dictionary<Delegate, List<Func<object, ValueTask>>>> _actions = new();
|
||||
private readonly object locker = new();
|
||||
|
||||
public Task Sub<TData>(in TypedKey<TData> key, Func<TData, ValueTask> action)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace NadekoBot.Common;
|
||||
|
||||
public class JsonSeria : ISeria
|
||||
{
|
||||
private JsonSerializerOptions serializerOptions = new JsonSerializerOptions()
|
||||
private readonly JsonSerializerOptions serializerOptions = new()
|
||||
{
|
||||
Converters =
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ public readonly struct TypedKey<TData>
|
||||
}
|
||||
|
||||
public static implicit operator TypedKey<TData>(in string input)
|
||||
=> new TypedKey<TData>(input);
|
||||
=> new(input);
|
||||
public static implicit operator string(in TypedKey<TData> input)
|
||||
=> input.Key;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ public class YamlSeria : IConfigSeria
|
||||
private readonly IDeserializer _deserializer;
|
||||
|
||||
private static readonly Regex CodePointRegex
|
||||
= new Regex(@"(\\U(?<code>[a-zA-Z0-9]{8})|\\u(?<code>[a-zA-Z0-9]{4})|\\x(?<code>[a-zA-Z0-9]{2}))",
|
||||
= new(@"(\\U(?<code>[a-zA-Z0-9]{8})|\\u(?<code>[a-zA-Z0-9]{4})|\\x(?<code>[a-zA-Z0-9]{2}))",
|
||||
RegexOptions.Compiled);
|
||||
|
||||
public YamlSeria()
|
||||
|
||||
Reference in New Issue
Block a user