Class ActionProgress<T>
Lightweight IProgress<T> that delegates to an Action<T>. Unlike Progress<T>, does not capture SynchronizationContext and invokes the handler synchronously on the caller's thread.
public class ActionProgress<T> : IProgress<T>
Type Parameters
T
- Inheritance
-
ActionProgress<T>
- Implements
-
IProgress<T>
- Inherited Members
- Extension Methods
Constructors
ActionProgress(Action<T>)
public ActionProgress(Action<T> handler)
Parameters
handlerAction<T>
Methods
FromLogger(ILogger)
Creates an IProgress<T> that routes MultiTagMessage to the appropriate ILogger level.
public static IProgress<object> FromLogger(ILogger logger)
Parameters
loggerILogger
Returns
Report(T)
Reports a progress update.
public void Report(T value)
Parameters
valueTThe value of the updated progress.