Skip to content

Commit 36df0a6

Browse files
committed
code formatting
1 parent 99cb4af commit 36df0a6

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

src/Serilog.Settings.Configuration/Settings/Configuration/ConfigurationReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ IConfigurationArgumentValue GetArgumentValue(IConfigurationSection argumentSecti
222222
{
223223
IConfigurationArgumentValue argumentValue;
224224

225-
if(argumentSection.Value != null && argumentSection.GetChildren().Any())
225+
if (argumentSection.Value != null && argumentSection.GetChildren().Any())
226226
throw new InvalidOperationException($"Combined configuration sources must result in a discrete value (string, int, etc.) or complex value (section, list, etc.), not both. Argument: {argumentSection.Path}");
227227

228228
if (argumentSection.Value != null)

test/Serilog.Settings.Configuration.Tests/ConfigurationSettingsTests.cs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ public class ConfigurationSettingsTests
1515
static LoggerConfiguration ConfigFromJson(string jsonString, string secondJsonSource = null)
1616
{
1717
var builder = new ConfigurationBuilder().AddJsonString(jsonString);
18-
if(secondJsonSource != null) builder.AddJsonString(secondJsonSource);
18+
if (secondJsonSource != null)
19+
builder.AddJsonString(secondJsonSource);
1920
var config = builder.Build();
2021
return new LoggerConfiguration()
2122
.ReadFrom.Configuration(config);
@@ -33,7 +34,7 @@ public void PropertyEnrichmentIsApplied()
3334
}
3435
}
3536
}";
36-
37+
3738
var log = ConfigFromJson(json)
3839
.WriteTo.Sink(new DelegatingSink(e => evt = e))
3940
.CreateLogger();
@@ -116,7 +117,7 @@ public void AuditSinksAreConfigured()
116117

117118
var log = ConfigFromJson(json)
118119
.CreateLogger();
119-
120+
120121
DummyRollingFileSink.Emitted.Clear();
121122
DummyRollingFileAuditSink.Emitted.Clear();
122123

@@ -229,7 +230,7 @@ public void LoggingLevelSwitchWithInvalidNameThrowsFormatException()
229230
""LevelSwitches"": {""switchNameNotStartingWithDollar"" : ""Warning"" }
230231
}
231232
}";
232-
233+
233234
var ex = Assert.Throws<FormatException>(() => ConfigFromJson(json));
234235

235236
Assert.Contains("\"switchNameNotStartingWithDollar\"", ex.Message);
@@ -273,7 +274,7 @@ public void SettingMinimumLevelControlledByToAnUndeclaredSwitchThrows()
273274
}
274275
}
275276
}";
276-
277+
277278
var ex = Assert.Throws<InvalidOperationException>(() =>
278279
ConfigFromJson(json)
279280
.CreateLogger());
@@ -334,7 +335,7 @@ public void ReferencingAnUndeclaredSwitchInSinkThrows()
334335
}]
335336
}
336337
}";
337-
338+
338339
var ex = Assert.Throws<InvalidOperationException>(() =>
339340
ConfigFromJson(json)
340341
.CreateLogger());
@@ -546,8 +547,8 @@ public void WriteToSubLoggerWithLevelSwitchIsSupported()
546547
}
547548
}]
548549
}
549-
}";
550-
550+
}";
551+
551552
var log = ConfigFromJson(json)
552553
.CreateLogger();
553554

@@ -590,7 +591,8 @@ public void MultipleArgumentValuesThrowsInvalidOperationException()
590591
// the multiple values are recognized; it will never attempt to locate
591592
// a matching argument.
592593

593-
var ex = Assert.Throws<InvalidOperationException>(() => ConfigFromJson(jsonDiscreteValue, jsonComplexValue));
594+
var ex = Assert.Throws<InvalidOperationException>(()
595+
=> ConfigFromJson(jsonDiscreteValue, jsonComplexValue));
594596

595597
Assert.Contains("Combined configuration sources", ex.Message);
596598
Assert.Contains("pathFormat", ex.Message);

0 commit comments

Comments
 (0)