#pragma warning disable CS1591
#pragma warning disable SA1600
using System;
namespace MediaBrowser.Common.Progress
{
///
/// Class ActionableProgress
///
///
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);
}
}
public class SimpleProgress : IProgress
{
public event EventHandler ProgressChanged;
public void Report(T value)
{
ProgressChanged?.Invoke(this, value);
}
}
}