File tree Expand file tree Collapse file tree 4 files changed +4
-8
lines changed
src/Serilog.Enrichers.ExcelDna/Enrichers/ExcelDna Expand file tree Collapse file tree 4 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,7 @@ public class ExcelBitnessEnricher : ILogEventEnricher
3535 public void Enrich ( LogEvent logEvent , ILogEventPropertyFactory propertyFactory )
3636 {
3737 var cachedProperty =
38- _cachedProperty =
39- _cachedProperty ?? propertyFactory . CreateProperty ( ExcelBitnessPropertyName , GetExcelBitnessInfo ( ) ) ;
38+ _cachedProperty ??= propertyFactory . CreateProperty ( ExcelBitnessPropertyName , GetExcelBitnessInfo ( ) ) ;
4039
4140 logEvent . AddPropertyIfAbsent ( cachedProperty ) ;
4241 }
Original file line number Diff line number Diff line change @@ -34,8 +34,7 @@ public class ExcelVersionEnricher : ILogEventEnricher
3434 public void Enrich ( LogEvent logEvent , ILogEventPropertyFactory propertyFactory )
3535 {
3636 var cachedProperty =
37- _cachedProperty =
38- _cachedProperty ?? propertyFactory . CreateProperty ( ExcelVersionPropertyName , ExcelDnaUtil . ExcelVersion ) ;
37+ _cachedProperty ??= propertyFactory . CreateProperty ( ExcelVersionPropertyName , ExcelDnaUtil . ExcelVersion ) ;
3938
4039 logEvent . AddPropertyIfAbsent ( cachedProperty ) ;
4140 }
Original file line number Diff line number Diff line change @@ -46,8 +46,7 @@ public ExcelVersionNameEnricher(bool includeExcelBitness = true)
4646 public void Enrich ( LogEvent logEvent , ILogEventPropertyFactory propertyFactory )
4747 {
4848 var cachedProperty =
49- _cachedProperty =
50- _cachedProperty ?? propertyFactory . CreateProperty ( ExcelVersionNamePropertyName , GetExcelVersionName ( _includeExcelBitness ) ) ;
49+ _cachedProperty ??= propertyFactory . CreateProperty ( ExcelVersionNamePropertyName , GetExcelVersionName ( _includeExcelBitness ) ) ;
5150
5251 logEvent . AddPropertyIfAbsent ( cachedProperty ) ;
5352 }
Original file line number Diff line number Diff line change @@ -34,8 +34,7 @@ public class XllPathEnricher : ILogEventEnricher
3434 public void Enrich ( LogEvent logEvent , ILogEventPropertyFactory propertyFactory )
3535 {
3636 var cachedProperty =
37- _cachedProperty =
38- _cachedProperty ?? propertyFactory . CreateProperty ( XllPathPropertyName , ExcelDnaUtil . XllPath ) ;
37+ _cachedProperty ??= propertyFactory . CreateProperty ( XllPathPropertyName , ExcelDnaUtil . XllPath ) ;
3938
4039 logEvent . AddPropertyIfAbsent ( cachedProperty ) ;
4140 }
You can’t perform that action at this time.
0 commit comments