<PackageReference Include="NLog" Version="6.2.1" />

NLog.Layouts.Layout<T>

public sealed class Layout<T> : Layout, ILayoutTypeValue<T>, ILayoutTypeValue, IEquatable<T>
Typed Layout for easy conversion from NLog Layout logic to a simple value (ex. integer or enum)
public T FixedValue { get; }

Fixed value

public bool IsFixed { get; }

Is fixed value?

public Layout(Layout layout)

Initializes a new instance of the Layout<T> class.

public Layout(Layout layout, string parseValueFormat, CultureInfo parseValueCulture)

Initializes a new instance of the Layout<T> class.

public Layout(T value)

Initializes a new instance of the Layout<T> class.

public static Layout<T> FromMethod(Func<LogEventInfo, T> layoutMethod, LayoutRenderOptions options = 0)

Create a typed layout from a lambda method.

public static bool op_Equality(Layout<T> left, T right)

Implements the operator == using FixedValue

public static Layout<T> op_Implicit(T value)

Converts a given value to a Layout<T>.

public static Layout<T> op_Implicit(string layout)

Converts a given text to a Layout<T>.

public static bool op_Inequality(Layout<T> left, T right)

Implements the operator != using FixedValue

public bool Equals(T other)

Implements Equals using FixedValue