| LayoutFromMethod Method |
Namespace:
NLog.Layouts
Assembly:
NLog (in NLog.dll) Version: 5.3.1+cf6675da40ccfd4c8c526a3b2bdbeed3442910a1
Syntax public static Layout FromMethod(
Func<LogEventInfo, Object> layoutMethod,
LayoutRenderOptions options = LayoutRenderOptions.None
)
Public Shared Function FromMethod (
layoutMethod As Func(Of LogEventInfo, Object),
Optional options As LayoutRenderOptions = LayoutRenderOptions.None
) As Layout
Dim layoutMethod As Func(Of LogEventInfo, Object)
Dim options As LayoutRenderOptions
Dim returnValue As Layout
returnValue = Layout.FromMethod(layoutMethod,
options)
static member FromMethod :
layoutMethod : Func<LogEventInfo, Object> *
?options : LayoutRenderOptions
(* Defaults:
let _options = defaultArg options LayoutRenderOptions.None
*)
-> Layout
Parameters
- layoutMethod
- Type: SystemFuncLogEventInfo, Object
Method that renders the layout. - options (Optional)
- Type: NLog.LayoutsLayoutRenderOptions
Tell if method is safe for concurrent threading.
Return Value
Type:
LayoutInstance of
SimpleLayout.
See Also