Skip to content

Commit 962e721

Browse files
authored
Merge pull request #99 from leotsarev/patch-1
Fix nullability for DiagnosticContext.Set
2 parents 87e316f + 2ce30f3 commit 962e721

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Serilog.Extensions.Hosting/Extensions/Hosting/DiagnosticContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public DiagnosticContextCollector BeginCollection()
4545
}
4646

4747
/// <inheritdoc cref="IDiagnosticContext.Set"/>
48-
public void Set(string propertyName, object value, bool destructureObjects = false)
48+
public void Set(string propertyName, object? value, bool destructureObjects = false)
4949
{
5050
if (propertyName == null) throw new ArgumentNullException(nameof(propertyName));
5151

src/Serilog.Extensions.Hosting/IDiagnosticContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public interface IDiagnosticContext
2929
/// <param name="value">The property value.</param>
3030
/// <param name="destructureObjects">If true, the value will be serialized as structured
3131
/// data if possible; if false, the object will be recorded as a scalar or simple array.</param>
32-
void Set(string propertyName, object value, bool destructureObjects = false);
32+
void Set(string propertyName, object? value, bool destructureObjects = false);
3333

3434
/// <summary>
3535
/// Set the specified exception on the current diagnostic context.

0 commit comments

Comments
 (0)