Click or drag to resize
NLogISuppress Interface
Provides an interface to execute System.Actions without surfacing any exceptions raised for that action.

Namespace: NLog
Assembly: NLog (in NLog.dll) Version: 0.0.0.0
Syntax
public interface ISuppress
Methods
  NameDescription
Public methodSwallow(Action)
Runs action. If the action throws, the exception is logged at Error level. Exception is not propagated outside of this method.
Public methodSwallowT(FuncT)
Runs the provided 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.
Public methodSwallowT(FuncT, T)
Runs the provided 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.
Public methodSwallowAsync(FuncTask)
Runs async action. If the action throws, the exception is logged at Error level. Exception is not propagated outside of this method.
Public methodSwallowAsyncT(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.
Public methodSwallowAsyncT(FuncTaskT, T)
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.
Top
See Also