<PackageReference Include="Serilog.Sinks.MSSqlServer" Version="10.0.1-dev-00185" />

Serilog.Sinks.MSSqlServer.SetProperty

public static class SetProperty
Helper for applying only those properties actually specified in external configuration.
public sealed delegate PropertySetter<T> : MulticastDelegate

Simulates passing a property-setter to an "out" argument.

public static void IfEnumNotNull<T>(string value, PropertySetter<T> setter) where T : Enum

This will only set a value (execute the PropertySetter delegate) if the value is non-null. It also converts the provided value to the requested enum type. This allows configuration to only apply property changes when external configuration has actually provided a value.

public static void IfNotNull<T>(string value, PropertySetter<T> setter)

This will only set a value (execute the PropertySetter delegate) if the value is non-null. It also converts the provided value to the requested type. This allows configuration to only apply property changes when external configuration has actually provided a value.

public static void IfNotNullOrEmpty<T>(string value, PropertySetter<T> setter)

This will only set a value (execute the PropertySetter delegate) if the value is non-null and isn't empty or whitespace. This override is used when {T} is a string value that can't be empty. It also converts the provided value to the requested type. This allows configuration to only apply property changes when external configuration has actually provided a value.