File tree Expand file tree Collapse file tree
test/Serilog.Settings.Configuration.Tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -333,7 +333,7 @@ public void ParseLogEventLevelThrowsForInvalidValues(string value)
333333 [ Fact ]
334334 public void ParamsStringArrayParameter_WithNoArgsSupplied_IsMatchedOptional ( )
335335 {
336- var candidateMethods = typeof ( ParamsArrayExtentions )
336+ var candidateMethods = typeof ( ParamsArrayExtensions )
337337 . GetTypeInfo ( )
338338 . DeclaredMethods
339339 . ToList ( ) ;
@@ -352,7 +352,7 @@ public void ParamsStringArrayParameter_ImplicitValueIsEmptyArray()
352352 AssemblyFinder . ForSource ( ConfigurationAssemblySource . UseLoadedAssemblies ) ,
353353 new ConfigurationReaderOptions ( ) ) ;
354354
355- var method = typeof ( ParamsArrayExtentions ) . GetMethod ( "WithParamsArray" ) ! ;
355+ var method = typeof ( ParamsArrayExtensions ) . GetMethod ( "WithParamsArray" ) ! ;
356356 var param = method . GetParameters ( ) . Last ( ) ;
357357
358358 var result = reader . GetImplicitValueForNotSpecifiedKey ( param , method ) ;
Original file line number Diff line number Diff line change 1+ using Serilog . Configuration ;
2+ using Serilog . Core ;
3+ using Serilog . Events ;
4+
5+ namespace Serilog . Settings . Configuration . Tests . Support
6+ {
7+ internal static class ParamsArrayExtensions
8+ {
9+ public static LoggerConfiguration WithParamsArray ( this LoggerEnrichmentConfiguration configuration , params string [ ] values )
10+ {
11+ return configuration . With ( new ParamsArrayEnricher ( values ) ) ;
12+ }
13+ }
14+
15+ public class ParamsArrayEnricher : ILogEventEnricher
16+ {
17+ public static string [ ] ? LastValues { get ; set ; }
18+ public ParamsArrayEnricher ( string [ ] values )
19+ {
20+ LastValues = values ;
21+ }
22+
23+ public void Enrich ( LogEvent logEvent , ILogEventPropertyFactory propertyFactory ) { }
24+ }
25+ }
You can’t perform that action at this time.
0 commit comments