Skip to content

Commit

Permalink
Add missing scheduler interface to INetDaemonRxApp
Browse files Browse the repository at this point in the history
  • Loading branch information
helto4real committed Jan 11, 2021
1 parent 3e7b65f commit 8c37ddf
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/App/NetDaemon.App/Common/Reactive/INetDaemonReactive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace NetDaemon.Common.Reactive
/// <summary>
/// Implements the System.Reactive pattern for NetDaemon Apps
/// </summary>
public interface INetDaemonRxApp : INetDaemonAppBase, IRxEntity
public interface INetDaemonRxApp : INetDaemonAppBase, IRxSchedule, IRxEntity
{
/// <summary>
/// The observable events
Expand Down Expand Up @@ -143,30 +143,35 @@ public interface IRxSchedule
/// Run daily at a specific time
/// </summary>
/// <param name="time">The time in "hh:mm:ss" format</param>
IObservable<long> RunDaily(string time);
/// <param name="action">Action to run</param>
IDisposable RunDaily(string time, Action action);

/// <summary>
/// Shedules an action every (timespan)
/// </summary>
/// <param name="timespan">The timespan to schedule</param>
IObservable<long> RunEvery(TimeSpan timespan);
/// <param name="action">Action to run</param>
IDisposable RunEvery(TimeSpan timespan, Action action);

/// <summary>
/// Shedules an action every (timespan)
/// </summary>
/// <param name="time">The time in "mm:ss" format</param>
IObservable<long> RunEveryHour(string time);
/// <param name="action">Action to run</param>
IDisposable RunEveryHour(string time, Action action);

/// <summary>
/// Shedules an action every (timespan)
/// </summary>
/// <param name="second">The timespan to schedule</param>
IObservable<long> RunEveryMinute(short second);
/// <param name="action">Action to run</param>
IDisposable RunEveryMinute(short second, Action action);

/// <summary>
/// Delays excecution of an action (timespan) time
/// </summary>
/// <param name="timespan">Timespan to delay</param>
IObservable<long> RunIn(TimeSpan timespan);
/// <param name="action">Action to run</param>
IDisposable RunIn(TimeSpan timespan, Action action);
}
}

0 comments on commit 8c37ddf

Please sign in to comment.