Table of Contents

Interface IDestructuringPolicy

Namespace
Serilog.Core
Assembly
Serilog.dll

Determine how, when destructuring, a supplied value is represented as a complex log event property.

public interface IDestructuringPolicy

Methods

TryDestructure(object, ILogEventPropertyValueFactory, out LogEventPropertyValue?)

If supported, destructure the provided value.

bool TryDestructure(object value, ILogEventPropertyValueFactory propertyValueFactory, out LogEventPropertyValue? result)

Parameters

value object

The value to destructure.

propertyValueFactory ILogEventPropertyValueFactory

Recursively apply policies to destructure additional values.

result LogEventPropertyValue

The destructured value, or null.

Returns

bool

True if the value could be destructured under this policy.