Click or drag to resize
NLogISuppressSwallowAsyncT Method (FuncTaskT)
Runs the provided async function and returns its result. If exception is thrown, it is logged at Error level. Exception is not propagated outside of this method. Fallback value is returned instead.

Namespace: NLog
Assembly: NLog (in NLog.dll) Version:
Task<T> SwallowAsync<T>(
	Func<Task<T>> asyncFunc


Type: SystemFuncTaskT
Async function to run.

Type Parameters

Return type of the provided function.

Return Value

Type: TaskT
Result returned by the provided function or fallback value in case of exception.
See Also