2020using System . Text . RegularExpressions ;
2121using Serilog . Events ;
2222using Serilog . Expressions . Runtime ;
23- using Serilog . Formatting . Display ;
2423using Serilog . Parsing ;
2524using Serilog . Templates . Compilation ;
2625
@@ -32,7 +31,7 @@ static class Intrinsics
3231 {
3332 static readonly LogEventPropertyValue NegativeOne = new ScalarValue ( - 1 ) ;
3433 static readonly LogEventPropertyValue Tombstone = new ScalarValue ( "😬 (if you see this you have found a bug.)" ) ;
35-
34+
3635 public static List < LogEventPropertyValue ? > CollectSequenceElements ( LogEventPropertyValue ? [ ] elements )
3736 {
3837 return elements . ToList ( ) ;
@@ -53,18 +52,18 @@ static class Intrinsics
5352 if ( content is SequenceValue sequence )
5453 foreach ( var element in sequence . Elements )
5554 elements . Add ( element ) ;
56-
55+
5756 return elements ;
5857 }
5958
6059 public static LogEventPropertyValue ConstructSequenceValue ( List < LogEventPropertyValue ? > elements )
6160 {
6261 if ( elements . Any ( el => el == null ) )
6362 return new SequenceValue ( elements . Where ( el => el != null ) ) ;
64-
63+
6564 return new SequenceValue ( elements ) ;
6665 }
67-
66+
6867 public static List < LogEventProperty > CollectStructureProperties ( string [ ] names , LogEventPropertyValue ? [ ] values )
6968 {
7069 var properties = new List < LogEventProperty > ( ) ;
@@ -85,7 +84,7 @@ public static LogEventPropertyValue ConstructStructureValue(List<LogEventPropert
8584
8685 return new StructureValue ( properties ) ;
8786 }
88-
87+
8988 public static List < LogEventProperty > ExtendStructureValueWithSpread (
9089 List < LogEventProperty > properties ,
9190 LogEventPropertyValue ? content )
@@ -99,7 +98,7 @@ public static List<LogEventProperty> ExtendStructureValueWithSpread(
9998
10099 return properties ;
101100 }
102-
101+
103102 public static List < LogEventProperty > ExtendStructureValueWithProperty (
104103 List < LogEventProperty > properties ,
105104 string name ,
@@ -129,7 +128,7 @@ public static bool CoerceToScalarBoolean(LogEventPropertyValue value)
129128 return b ;
130129 return false ;
131130 }
132-
131+
133132 public static LogEventPropertyValue ? IndexOfMatch ( LogEventPropertyValue value , Regex regex )
134133 {
135134 if ( value is ScalarValue scalar &&
@@ -193,9 +192,9 @@ public static string RenderMessage(CompiledMessageToken formatter, EvaluationCon
193192 if ( token is PropertyToken { Format : { } } pt )
194193 {
195194 elements ??= new List < LogEventPropertyValue > ( ) ;
196-
195+
197196 var space = new StringWriter ( ) ;
198-
197+
199198 pt . Render ( logEvent . Properties , space , formatProvider ) ;
200199 elements . Add ( new ScalarValue ( space . ToString ( ) ) ) ;
201200 }
0 commit comments