#pragma warning disable CS1591
#pragma warning disable CA1003
using System;
namespace MediaBrowser.Common.Progress
{
///
/// Class ActionableProgress.
///
/// The type for the action parameter.
public class ActionableProgress : IProgress
{
///
/// The _actions.
///
private Action _action;
public event EventHandler ProgressChanged;
///
/// Registers the action.
///
/// The action.
public void RegisterAction(Action action)
{
_action = action;
}
public void Report(T value)
{
ProgressChanged?.Invoke(this, value);
_action?.Invoke(value);
}
}
}