Table of Contents

Class ScalarValue

Namespace
Serilog.Events
Assembly
Serilog.dll

A property value corresponding to a simple, scalar type.

public class ScalarValue : LogEventPropertyValue, IFormattable
Inheritance
ScalarValue
Implements
Inherited Members

Constructors

ScalarValue(object?)

Construct a ScalarValue with the specified value.

public ScalarValue(object? value)

Parameters

value object

The value, which may be

null
.

Properties

Null

Scalar value representing null.

public static ScalarValue Null { get; }

Property Value

ScalarValue

Value

The value, which may be

null
.
public object? Value { get; }

Property Value

object

Methods

Equals(object?)

Determine if this instance is equal to obj.

public override bool Equals(object? obj)

Parameters

obj object

The instance to compare with.

Returns

bool

true if the instances are equal; otherwise, false.

GetHashCode()

Get a hash code representing the value.

public override int GetHashCode()

Returns

int

The instance's hash code.

Render(TextWriter, string?, IFormatProvider?)

Render the value to the output.

public override void Render(TextWriter output, string? format = null, IFormatProvider? formatProvider = null)

Parameters

output TextWriter

The output.

format string

A format string applied to the value, or null.

formatProvider IFormatProvider

A format provider to apply to the value, or null to use the default.

Exceptions

ArgumentNullException

When output is

null
See Also