jellyfin/MediaBrowser.Model/Tasks/ITaskTrigger.cs

32 lines
841 B
C#
Raw Normal View History

using System;
using Microsoft.Extensions.Logging;
2018-12-27 16:27:57 -07:00
namespace MediaBrowser.Model.Tasks
{
/// <summary>
2020-02-03 17:49:27 -07:00
/// Interface ITaskTrigger.
2018-12-27 16:27:57 -07:00
/// </summary>
public interface ITaskTrigger
{
/// <summary>
2020-02-03 17:49:27 -07:00
/// Fires when the trigger condition is satisfied and the task should run.
2018-12-27 16:27:57 -07:00
/// </summary>
event EventHandler<EventArgs> Triggered;
/// <summary>
/// Gets or sets the options of this task.
/// </summary>
TaskOptions TaskOptions { get; set; }
/// <summary>
2020-02-03 17:49:27 -07:00
/// Stars waiting for the trigger action.
2018-12-27 16:27:57 -07:00
/// </summary>
void Start(TaskResult lastResult, ILogger logger, string taskName, bool isApplicationStartup);
/// <summary>
2020-02-03 17:49:27 -07:00
/// Stops waiting for the trigger action.
2018-12-27 16:27:57 -07:00
/// </summary>
void Stop();
}
}