@@ -185,17 +185,17 @@ public void MethodsAreSelectedBasedOnCountOfMatchedArgumentsAndThenStringType()
185
185
Assert . Equal ( typeof ( string ) , selected ? . GetParameters ( ) [ 2 ] . ParameterType ) ;
186
186
}
187
187
188
- public static IEnumerable < object [ ] > FlatMinimumLevel => new List < object [ ] >
189
- {
190
- new object [ ] { GetConfigRoot ( appsettingsJsonLevel : minimumLevelFlatTemplate . Format ( LogEventLevel . Error ) ) , LogEventLevel . Error } ,
191
- new object [ ] { GetConfigRoot ( appsettingsDevelopmentJsonLevel : minimumLevelFlatTemplate . Format ( LogEventLevel . Error ) ) , LogEventLevel . Error } ,
192
- new object [ ] { GetConfigRoot ( envVariables : new Dictionary < string , string ? > { { minimumLevelFlatKey , LogEventLevel . Error . ToString ( ) } } ) , LogEventLevel . Error } ,
193
- new object [ ] { GetConfigRoot (
188
+ public static IEnumerable < object [ ] > FlatMinimumLevel =>
189
+ [
190
+ [ GetConfigRoot ( appsettingsJsonLevel : minimumLevelFlatTemplate . Format ( LogEventLevel . Error ) ) , LogEventLevel . Error ] ,
191
+ [ GetConfigRoot ( appsettingsDevelopmentJsonLevel : minimumLevelFlatTemplate . Format ( LogEventLevel . Error ) ) , LogEventLevel . Error ] ,
192
+ [ GetConfigRoot ( envVariables : new Dictionary < string , string ? > { { minimumLevelFlatKey , LogEventLevel . Error . ToString ( ) } } ) , LogEventLevel . Error ] ,
193
+ [ GetConfigRoot (
194
194
appsettingsJsonLevel : minimumLevelFlatTemplate . Format ( LogEventLevel . Debug ) ,
195
195
envVariables : new Dictionary < string , string ? > { { minimumLevelFlatKey , LogEventLevel . Error . ToString ( ) } } ) ,
196
196
LogEventLevel . Error
197
- }
198
- } ;
197
+ ]
198
+ ] ;
199
199
200
200
[ Theory ]
201
201
[ MemberData ( nameof ( FlatMinimumLevel ) ) ]
@@ -209,17 +209,17 @@ public void FlatMinimumLevelCorrectOneIsEnabledOnLogger(IConfigurationRoot root,
209
209
AssertLogEventLevels ( loggerConfig , expectedMinimumLevel ) ;
210
210
}
211
211
212
- public static IEnumerable < object [ ] > ObjectMinimumLevel => new List < object [ ] >
213
- {
214
- new object [ ] { GetConfigRoot ( appsettingsJsonLevel : minimumLevelObjectTemplate . Format ( LogEventLevel . Error ) ) , LogEventLevel . Error } ,
215
- new object [ ] { GetConfigRoot ( appsettingsJsonLevel : minimumLevelObjectTemplate . Format ( LogEventLevel . Error . ToString ( ) . ToUpper ( ) ) ) , LogEventLevel . Error } ,
216
- new object [ ] { GetConfigRoot ( appsettingsDevelopmentJsonLevel : minimumLevelObjectTemplate . Format ( LogEventLevel . Error ) ) , LogEventLevel . Error } ,
217
- new object [ ] { GetConfigRoot ( envVariables : new Dictionary < string , string ? > { { minimumLevelObjectKey , LogEventLevel . Error . ToString ( ) } } ) , LogEventLevel . Error } ,
218
- new object [ ] { GetConfigRoot (
212
+ public static IEnumerable < object [ ] > ObjectMinimumLevel =>
213
+ [
214
+ [ GetConfigRoot ( appsettingsJsonLevel : minimumLevelObjectTemplate . Format ( LogEventLevel . Error ) ) , LogEventLevel . Error ] ,
215
+ [ GetConfigRoot ( appsettingsJsonLevel : minimumLevelObjectTemplate . Format ( LogEventLevel . Error . ToString ( ) . ToUpper ( ) ) ) , LogEventLevel . Error ] ,
216
+ [ GetConfigRoot ( appsettingsDevelopmentJsonLevel : minimumLevelObjectTemplate . Format ( LogEventLevel . Error ) ) , LogEventLevel . Error ] ,
217
+ [ GetConfigRoot ( envVariables : new Dictionary < string , string ? > { { minimumLevelObjectKey , LogEventLevel . Error . ToString ( ) } } ) , LogEventLevel . Error ] ,
218
+ [ GetConfigRoot (
219
219
appsettingsJsonLevel : minimumLevelObjectTemplate . Format ( LogEventLevel . Error ) ,
220
220
appsettingsDevelopmentJsonLevel : minimumLevelObjectTemplate . Format ( LogEventLevel . Debug ) ) ,
221
- LogEventLevel . Debug }
222
- } ;
221
+ LogEventLevel . Debug ]
222
+ ] ;
223
223
224
224
[ Theory ]
225
225
[ MemberData ( nameof ( ObjectMinimumLevel ) ) ]
@@ -234,34 +234,31 @@ public void ObjectMinimumLevelCorrectOneIsEnabledOnLogger(IConfigurationRoot roo
234
234
}
235
235
236
236
// currently only works in the .NET 4.6.1 and .NET Standard builds of Serilog.Settings.Configuration
237
- public static IEnumerable < object [ ] > MixedMinimumLevel => new List < object [ ] >
238
- {
239
- new object [ ]
240
- {
237
+ public static IEnumerable < object [ ] > MixedMinimumLevel =>
238
+ [
239
+ [
241
240
GetConfigRoot (
242
241
appsettingsJsonLevel : minimumLevelObjectTemplate . Format ( LogEventLevel . Error ) ,
243
242
appsettingsDevelopmentJsonLevel : minimumLevelFlatTemplate . Format ( LogEventLevel . Debug ) ) ,
244
243
LogEventLevel . Debug
245
- } ,
246
- new object [ ]
247
- {
244
+ ] ,
245
+ [
248
246
GetConfigRoot (
249
247
appsettingsJsonLevel : minimumLevelFlatTemplate . Format ( LogEventLevel . Error ) ,
250
248
appsettingsDevelopmentJsonLevel : minimumLevelObjectTemplate . Format ( LogEventLevel . Debug ) ) ,
251
249
LogEventLevel . Debug
252
- } ,
250
+ ] ,
253
251
// precedence should be flat > object if from the same source
254
- new object [ ]
255
- {
252
+ [
256
253
GetConfigRoot (
257
254
envVariables : new Dictionary < string , string ? > ( )
258
255
{
259
256
{ minimumLevelObjectKey , LogEventLevel . Error . ToString ( ) } ,
260
257
{ minimumLevelFlatKey , LogEventLevel . Debug . ToString ( ) }
261
258
} ) ,
262
259
LogEventLevel . Debug
263
- }
264
- } ;
260
+ ]
261
+ ] ;
265
262
266
263
[ Theory ]
267
264
[ MemberData ( nameof ( MixedMinimumLevel ) ) ]
0 commit comments