Click or drag to resize

LayoutT Class

Typed Layout for easy conversion from NLog Layout logic to a simple value (ex. integer or enum)
Inheritance Hierarchy
SystemObject
  NLog.LayoutsLayout
    NLog.LayoutsLayoutT

Namespace:  NLog.Layouts
Assembly:  NLog (in NLog.dll) Version: 5.3.4+73d83d3161d31288ca5c554cc50d27b6bed5f28b
Syntax
public sealed class Layout<T> : Layout, 
	IEquatable<T>

Type Parameters

T

The LayoutT type exposes the following members.

Constructors
  NameDescription
Public methodLayoutT(Layout)
Initializes a new instance of the LayoutT class.
Public methodLayoutT(T)
Initializes a new instance of the LayoutT class.
Public methodLayoutT(Layout, String, CultureInfo)
Initializes a new instance of the LayoutT class.
Top
Properties
  NameDescription
Public propertyFixedValue
Fixed value
Public propertyIsFixed
Is fixed value?
Top
Methods
  NameDescription
Public methodEquals(T)
Implements Equals using FixedValue
Public methodEquals(Object)
Determines whether the specified object is equal to the current object.
(Overrides ObjectEquals(Object).)
Public methodStatic memberFromMethod
Create a typed layout from a lambda method.
Public methodGetHashCode
Serves as the default hash function.
(Overrides ObjectGetHashCode.)
Public methodPrecalculate
Precalculates the layout for the specified log event and stores the result in per-log event cache. Only if the layout doesn't have [ThreadAgnostic] and doesn't contain layouts with [ThreadAgnostic].
(Overrides LayoutPrecalculate(LogEventInfo).)
Public methodRender(LogEventInfo)
Renders formatted output using the log event as context.
(Inherited from Layout.)
Public methodRender(LogEventInfo, StringBuilder)
Optimized version of Render(LogEventInfo) that works best when override of RenderFormattedMessage(LogEventInfo, StringBuilder) is available.
(Inherited from Layout.)
Public methodToString
Returns a string that represents the current object.
(Overrides ObjectToString.)
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Implements the operator == using FixedValue
Public operatorStatic member(T to LayoutT)
Converts a given value to a LayoutT.
Public operatorStatic member(String to LayoutT)
Converts a given text to a LayoutT.
Public operatorStatic memberInequality
Implements the operator != using FixedValue
Top
Extension Methods
See Also