Innovenergy_trunk/csharp/app/GuiFeeder/Utils.cs

21 lines
473 B
C#
Raw Normal View History

2023-02-16 12:57:06 +00:00
using System.Reactive.Linq;
using InnovEnergy.Lib.Protocols.DBus;
using InnovEnergy.Lib.Victron.VeDBus;
namespace InnovEnergy.GuiFeeder;
public static class Utils
{
public static IObservable<IReadOnlyList<ServiceProperties>> ObserveVeService(this DBusConnection dbus,
Func<String, Boolean> selector)
{
return dbus
.ObservePropertiesOfServices(selector)
.StartWith(Array.Empty<ServiceProperties>());
}
}