This commit is contained in:
LukePulverenti
2013-02-24 16:53:54 -05:00
parent 6c86721f6d
commit 8ce3e74e81
93 changed files with 2458 additions and 1584 deletions

View File

@@ -6,7 +6,7 @@ namespace MediaBrowser.Common.ScheduledTasks
/// <summary>
/// Represents a task trigger that fires on a weekly basis
/// </summary>
public class WeeklyTrigger : BaseTaskTrigger
public class WeeklyTrigger : ITaskTrigger
{
/// <summary>
/// Get the time of day to trigger the task to run
@@ -30,7 +30,7 @@ namespace MediaBrowser.Common.ScheduledTasks
/// Stars waiting for the trigger action
/// </summary>
/// <param name="isApplicationStartup">if set to <c>true</c> [is application startup].</param>
protected internal override void Start(bool isApplicationStartup)
public void Start(bool isApplicationStartup)
{
DisposeTimer();
@@ -69,25 +69,11 @@ namespace MediaBrowser.Common.ScheduledTasks
/// <summary>
/// Stops waiting for the trigger action
/// </summary>
protected internal override void Stop()
public void Stop()
{
DisposeTimer();
}
/// <summary>
/// Disposes this instance.
/// </summary>
/// <param name="dispose"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
protected override void Dispose(bool dispose)
{
if (dispose)
{
DisposeTimer();
}
base.Dispose(dispose);
}
/// <summary>
/// Disposes the timer.
/// </summary>
@@ -98,5 +84,21 @@ namespace MediaBrowser.Common.ScheduledTasks
Timer.Dispose();
}
}
/// <summary>
/// Occurs when [triggered].
/// </summary>
public event EventHandler<EventArgs> Triggered;
/// <summary>
/// Called when [triggered].
/// </summary>
private void OnTriggered()
{
if (Triggered != null)
{
Triggered(this, EventArgs.Empty);
}
}
}
}