Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}
}