From 8c37ddf07a49de5b52cf6cb884515ca66374a545 Mon Sep 17 00:00:00 2001 From: helto4real Date: Mon, 11 Jan 2021 17:21:28 +0100 Subject: [PATCH] Add missing scheduler interface to INetDaemonRxApp --- .../Common/Reactive/INetDaemonReactive.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/App/NetDaemon.App/Common/Reactive/INetDaemonReactive.cs b/src/App/NetDaemon.App/Common/Reactive/INetDaemonReactive.cs index e9200f97b..a793d69f1 100644 --- a/src/App/NetDaemon.App/Common/Reactive/INetDaemonReactive.cs +++ b/src/App/NetDaemon.App/Common/Reactive/INetDaemonReactive.cs @@ -8,7 +8,7 @@ namespace NetDaemon.Common.Reactive /// /// Implements the System.Reactive pattern for NetDaemon Apps /// - public interface INetDaemonRxApp : INetDaemonAppBase, IRxEntity + public interface INetDaemonRxApp : INetDaemonAppBase, IRxSchedule, IRxEntity { /// /// The observable events @@ -143,30 +143,35 @@ public interface IRxSchedule /// Run daily at a specific time /// /// The time in "hh:mm:ss" format - IObservable RunDaily(string time); + /// Action to run + IDisposable RunDaily(string time, Action action); /// /// Shedules an action every (timespan) /// /// The timespan to schedule - IObservable RunEvery(TimeSpan timespan); + /// Action to run + IDisposable RunEvery(TimeSpan timespan, Action action); /// /// Shedules an action every (timespan) /// /// The time in "mm:ss" format - IObservable RunEveryHour(string time); + /// Action to run + IDisposable RunEveryHour(string time, Action action); /// /// Shedules an action every (timespan) /// /// The timespan to schedule - IObservable RunEveryMinute(short second); + /// Action to run + IDisposable RunEveryMinute(short second, Action action); /// /// Delays excecution of an action (timespan) time /// /// Timespan to delay - IObservable RunIn(TimeSpan timespan); + /// Action to run + IDisposable RunIn(TimeSpan timespan, Action action); } } \ No newline at end of file