Skip to content

Commit

Permalink
More minor code cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
0xced committed Feb 19, 2024
1 parent 67afedd commit a6fe8ec
Showing 1 changed file with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using Microsoft.Extensions.Configuration;
using System.Collections;
using System.Globalization;
using Microsoft.Extensions.Configuration;
using Serilog.Configuration;
using Serilog.Events;
using Serilog.Settings.Configuration.Tests.Support;
using System.Collections;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using TestDummies;
using TestDummies.Console;

Expand Down Expand Up @@ -490,7 +489,7 @@ public bool Remove(KeyValuePair<string, int> item)
return backing.Remove(item);
}

public bool TryGetValue(string key, [MaybeNullWhen(false)] out int value)
public bool TryGetValue(string key, out int value)
{
return backing.TryGetValue(key, out value);
}
Expand Down Expand Up @@ -519,7 +518,7 @@ abstract class CustomAbstractDictionary : IDictionary<string, int>
public abstract IEnumerator<KeyValuePair<string, int>> GetEnumerator();
public abstract bool Remove(string key);
public abstract bool Remove(KeyValuePair<string, int> item);
public abstract bool TryGetValue(string key, [MaybeNullWhen(false)] out int value);
public abstract bool TryGetValue(string key, out int value);

IEnumerator IEnumerable.GetEnumerator()
{
Expand Down Expand Up @@ -564,7 +563,7 @@ public IEnumerator<KeyValuePair<string, int>> GetEnumerator()
throw new NotImplementedException();
}

public bool TryGetValue(string key, [MaybeNullWhen(false)] out int value)
public bool TryGetValue(string key, out int value)
{
throw new NotImplementedException();
}
Expand Down Expand Up @@ -592,9 +591,7 @@ public void ConvertToCustomReadOnlyDictionaryCreatesEmpty()
ConvertToReturnsType<CustomReadOnlyDictionary>(value);
}

class PrivateImplWithPublicCtor : AnAbstractClass, IAmAnInterface
{
}
class PrivateImplWithPublicCtor : AnAbstractClass, IAmAnInterface;

[Theory]
[InlineData(typeof(AbstractClass), typeof(ConcreteClass))]
Expand Down Expand Up @@ -631,7 +628,7 @@ public void ConvertToExplicitTypeUsingTypeAsConstructorArgument()
{
"Ctor": {
"$type": "Serilog.Settings.Configuration.Tests.ObjectArgumentValueTests+WithTypeArgumentClassCtor, Serilog.Settings.Configuration.Tests",
"type": "Serilog.Settings.Configuration.Tests.ObjectArgumentValueTests+PrivateImplWithPublicCtor, Serilog.Settings.Configuration.Tests",
"type": "Serilog.Settings.Configuration.Tests.ObjectArgumentValueTests+PrivateImplWithPublicCtor, Serilog.Settings.Configuration.Tests"
}
}
""", "Ctor");
Expand Down Expand Up @@ -698,7 +695,7 @@ public void ConvertToExplicitTypePickingConstructorOverloadWithMostMatchingArgum
public void ConvertToExplicitTypeMatchingArgumentsCaseInsensitively()
{
// language=json
var section = JsonStringConfigSource.LoadSection($$"""
var section = JsonStringConfigSource.LoadSection("""
{
"Ctor": {
"type": "Serilog.Settings.Configuration.Tests.ObjectArgumentValueTests+WithOverloads, Serilog.Settings.Configuration.Tests",
Expand Down

0 comments on commit a6fe8ec

Please sign in to comment.