Skip to content

Commit a6fe8ec

Browse files
committed
More minor code cleanups
1 parent 67afedd commit a6fe8ec

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

test/Serilog.Settings.Configuration.Tests/ObjectArgumentValueTests.cs

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
using Microsoft.Extensions.Configuration;
1+
using System.Collections;
2+
using System.Globalization;
3+
using Microsoft.Extensions.Configuration;
24
using Serilog.Configuration;
35
using Serilog.Events;
46
using Serilog.Settings.Configuration.Tests.Support;
5-
using System.Collections;
6-
using System.Diagnostics.CodeAnalysis;
7-
using System.Globalization;
87
using TestDummies;
98
using TestDummies.Console;
109

@@ -490,7 +489,7 @@ public bool Remove(KeyValuePair<string, int> item)
490489
return backing.Remove(item);
491490
}
492491

493-
public bool TryGetValue(string key, [MaybeNullWhen(false)] out int value)
492+
public bool TryGetValue(string key, out int value)
494493
{
495494
return backing.TryGetValue(key, out value);
496495
}
@@ -519,7 +518,7 @@ abstract class CustomAbstractDictionary : IDictionary<string, int>
519518
public abstract IEnumerator<KeyValuePair<string, int>> GetEnumerator();
520519
public abstract bool Remove(string key);
521520
public abstract bool Remove(KeyValuePair<string, int> item);
522-
public abstract bool TryGetValue(string key, [MaybeNullWhen(false)] out int value);
521+
public abstract bool TryGetValue(string key, out int value);
523522

524523
IEnumerator IEnumerable.GetEnumerator()
525524
{
@@ -564,7 +563,7 @@ public IEnumerator<KeyValuePair<string, int>> GetEnumerator()
564563
throw new NotImplementedException();
565564
}
566565

567-
public bool TryGetValue(string key, [MaybeNullWhen(false)] out int value)
566+
public bool TryGetValue(string key, out int value)
568567
{
569568
throw new NotImplementedException();
570569
}
@@ -592,9 +591,7 @@ public void ConvertToCustomReadOnlyDictionaryCreatesEmpty()
592591
ConvertToReturnsType<CustomReadOnlyDictionary>(value);
593592
}
594593

595-
class PrivateImplWithPublicCtor : AnAbstractClass, IAmAnInterface
596-
{
597-
}
594+
class PrivateImplWithPublicCtor : AnAbstractClass, IAmAnInterface;
598595

599596
[Theory]
600597
[InlineData(typeof(AbstractClass), typeof(ConcreteClass))]
@@ -631,7 +628,7 @@ public void ConvertToExplicitTypeUsingTypeAsConstructorArgument()
631628
{
632629
"Ctor": {
633630
"$type": "Serilog.Settings.Configuration.Tests.ObjectArgumentValueTests+WithTypeArgumentClassCtor, Serilog.Settings.Configuration.Tests",
634-
"type": "Serilog.Settings.Configuration.Tests.ObjectArgumentValueTests+PrivateImplWithPublicCtor, Serilog.Settings.Configuration.Tests",
631+
"type": "Serilog.Settings.Configuration.Tests.ObjectArgumentValueTests+PrivateImplWithPublicCtor, Serilog.Settings.Configuration.Tests"
635632
}
636633
}
637634
""", "Ctor");
@@ -698,7 +695,7 @@ public void ConvertToExplicitTypePickingConstructorOverloadWithMostMatchingArgum
698695
public void ConvertToExplicitTypeMatchingArgumentsCaseInsensitively()
699696
{
700697
// language=json
701-
var section = JsonStringConfigSource.LoadSection($$"""
698+
var section = JsonStringConfigSource.LoadSection("""
702699
{
703700
"Ctor": {
704701
"type": "Serilog.Settings.Configuration.Tests.ObjectArgumentValueTests+WithOverloads, Serilog.Settings.Configuration.Tests",

0 commit comments

Comments
 (0)