src/NLog/Layouts/Layout.cs
/// <summary>
/// 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]. 
/// </summary>
/// <param name="logEvent">The log event.</param>
/// <remarks>
/// Calling this method enables you to store the log event in a buffer
/// and/or potentially evaluate it in another thread even though the 
/// layout may contain thread-dependent renderer.
/// </remarks>
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].
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 ] .
public virtual void Precalculate(LogEventInfo logEvent)
        {
            if (!ThreadAgnostic || MutableUnsafe)
            {
                Render(logEvent);
            }
        }
public virtual void Precalculate ( LogEventInfo logEvent ) { if ( ! ThreadAgnostic || MutableUnsafe ) { Render ( logEvent ) ; } }
Precalculates the layout for the specified log event and stores the result
in per-log event cache.
Precalculates the layout for the specified log event and stores the result in per - log event cache .
logEvent
LogEventInfo
The log event.
The log event .
remarks
Calling this method enables you to store the log event in a buffer
and/or potentially evaluate it in another thread even though the
layout may contain thread-dependent renderer.
Calling this method enables you to store the log event in a buffer and / or potentially evaluate it in another thread even though the layout may contain thread - dependent renderer .