Skip to content

Commit 9747493

Browse files
committed
Updated deps
1 parent e1e163b commit 9747493

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

src/Serilog.Sinks.Exceptionless/Serilog.Sinks.Exceptionless.csproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<Description>Exceptionless sink for Serilog</Description>
5-
<VersionPrefix>3.0.3</VersionPrefix>
5+
<VersionPrefix>3.0.4</VersionPrefix>
66
<Authors>Serilog Contributors</Authors>
77
<TargetFrameworks>net45;netstandard1.2</TargetFrameworks>
88
<NoWarn>$(NoWarn);CS1591</NoWarn>
@@ -23,6 +23,10 @@
2323
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
2424
</PropertyGroup>
2525

26+
<ItemGroup>
27+
<None Remove="project.lock.json" />
28+
</ItemGroup>
29+
2630
<ItemGroup>
2731
<None Update="readme.txt">
2832
<Pack>true</Pack>
@@ -31,7 +35,7 @@
3135

3236
<ItemGroup>
3337
<PackageReference Include="Exceptionless.Signed" Version="4.0.1951" />
34-
<PackageReference Include="Serilog" Version="2.4.0" />
38+
<PackageReference Include="Serilog" Version="2.5.0" />
3539
</ItemGroup>
3640

3741
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">

src/Serilog.Sinks.Exceptionless/Sinks/Exceptionless/ExceptionlessClientExtensions.cs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ public static void SubmitFromLogEvent(this ExceptionlessClient client, LogEvent
2929
}
3030

3131
internal static string GetSource(this LogEvent log) {
32-
LogEventPropertyValue value;
33-
if (log.Properties.TryGetValue(Constants.SourceContextPropertyName, out value))
32+
if (log.Properties.TryGetValue(Constants.SourceContextPropertyName, out LogEventPropertyValue value))
3433
return value.FlattenProperties()?.ToString();
3534

3635
return null;
@@ -64,30 +63,26 @@ internal static object FlattenProperties(this LogEventPropertyValue value) {
6463
if (value == null)
6564
return null;
6665

67-
var scalar = value as ScalarValue;
68-
if (scalar != null)
66+
if (value is ScalarValue scalar)
6967
return scalar.Value;
7068

71-
var sequence = value as SequenceValue;
72-
if (sequence != null) {
69+
if (value is SequenceValue sequence) {
7370
var flattenedProperties = new List<object>(sequence.Elements.Count);
7471
foreach (var element in sequence.Elements)
7572
flattenedProperties.Add(element.FlattenProperties());
7673

7774
return flattenedProperties;
7875
}
7976

80-
var structure = value as StructureValue;
81-
if (structure != null) {
77+
if (value is StructureValue structure) {
8278
var flattenedProperties = new Dictionary<string, object>(structure.Properties.Count);
8379
foreach (var property in structure.Properties)
8480
flattenedProperties.Add(property.Name, property.Value.FlattenProperties());
8581

8682
return flattenedProperties;
8783
}
8884

89-
var dictionary = value as DictionaryValue;
90-
if (dictionary != null) {
85+
if (value is DictionaryValue dictionary) {
9186
var flattenedProperties = new Dictionary<object, object>(dictionary.Elements.Count);
9287
foreach (var element in dictionary.Elements)
9388
flattenedProperties.Add(element.Key.Value, element.Value.FlattenProperties());

src/Serilog.Sinks.Exceptionless/Sinks/Exceptionless/ExceptionlessSink.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,7 @@ public void Emit(LogEvent logEvent) {
9292
builder.SetProperty(property.Key, property.Value.FlattenProperties());
9393
}
9494

95-
if (_additionalOperation != null)
96-
_additionalOperation(builder);
97-
95+
_additionalOperation?.Invoke(builder);
9896
builder.Submit();
9997
}
10098

0 commit comments

Comments
 (0)