|
1 |
| -using Microsoft.Extensions.Configuration; |
| 1 | +using System.Collections; |
| 2 | +using System.Globalization; |
| 3 | +using Microsoft.Extensions.Configuration; |
2 | 4 | using Serilog.Configuration;
|
3 | 5 | using Serilog.Events;
|
4 | 6 | using Serilog.Settings.Configuration.Tests.Support;
|
5 |
| -using System.Collections; |
6 |
| -using System.Diagnostics.CodeAnalysis; |
7 |
| -using System.Globalization; |
8 | 7 | using TestDummies;
|
9 | 8 | using TestDummies.Console;
|
10 | 9 |
|
@@ -490,7 +489,7 @@ public bool Remove(KeyValuePair<string, int> item)
|
490 | 489 | return backing.Remove(item);
|
491 | 490 | }
|
492 | 491 |
|
493 |
| - public bool TryGetValue(string key, [MaybeNullWhen(false)] out int value) |
| 492 | + public bool TryGetValue(string key, out int value) |
494 | 493 | {
|
495 | 494 | return backing.TryGetValue(key, out value);
|
496 | 495 | }
|
@@ -519,7 +518,7 @@ abstract class CustomAbstractDictionary : IDictionary<string, int>
|
519 | 518 | public abstract IEnumerator<KeyValuePair<string, int>> GetEnumerator();
|
520 | 519 | public abstract bool Remove(string key);
|
521 | 520 | 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); |
523 | 522 |
|
524 | 523 | IEnumerator IEnumerable.GetEnumerator()
|
525 | 524 | {
|
@@ -564,7 +563,7 @@ public IEnumerator<KeyValuePair<string, int>> GetEnumerator()
|
564 | 563 | throw new NotImplementedException();
|
565 | 564 | }
|
566 | 565 |
|
567 |
| - public bool TryGetValue(string key, [MaybeNullWhen(false)] out int value) |
| 566 | + public bool TryGetValue(string key, out int value) |
568 | 567 | {
|
569 | 568 | throw new NotImplementedException();
|
570 | 569 | }
|
@@ -592,9 +591,7 @@ public void ConvertToCustomReadOnlyDictionaryCreatesEmpty()
|
592 | 591 | ConvertToReturnsType<CustomReadOnlyDictionary>(value);
|
593 | 592 | }
|
594 | 593 |
|
595 |
| - class PrivateImplWithPublicCtor : AnAbstractClass, IAmAnInterface |
596 |
| - { |
597 |
| - } |
| 594 | + class PrivateImplWithPublicCtor : AnAbstractClass, IAmAnInterface; |
598 | 595 |
|
599 | 596 | [Theory]
|
600 | 597 | [InlineData(typeof(AbstractClass), typeof(ConcreteClass))]
|
@@ -631,7 +628,7 @@ public void ConvertToExplicitTypeUsingTypeAsConstructorArgument()
|
631 | 628 | {
|
632 | 629 | "Ctor": {
|
633 | 630 | "$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" |
635 | 632 | }
|
636 | 633 | }
|
637 | 634 | """, "Ctor");
|
@@ -698,7 +695,7 @@ public void ConvertToExplicitTypePickingConstructorOverloadWithMostMatchingArgum
|
698 | 695 | public void ConvertToExplicitTypeMatchingArgumentsCaseInsensitively()
|
699 | 696 | {
|
700 | 697 | // language=json
|
701 |
| - var section = JsonStringConfigSource.LoadSection($$""" |
| 698 | + var section = JsonStringConfigSource.LoadSection(""" |
702 | 699 | {
|
703 | 700 | "Ctor": {
|
704 | 701 | "type": "Serilog.Settings.Configuration.Tests.ObjectArgumentValueTests+WithOverloads, Serilog.Settings.Configuration.Tests",
|
|
0 commit comments