Innovenergy_trunk/csharp/Lib/Protocols/DBus/DBusService.cs

21 lines
552 B
C#
Raw Normal View History

2023-02-16 12:57:06 +00:00
namespace InnovEnergy.Lib.Protocols.DBus;
public record DBusService
{
public String Id { get; }
public List<String> BusNames { get; }
public Int32 ProcessId { get; internal set; } // TODO
public DBusService(String id, List<String>? busNames = null, Int32 processId = -1)
{
Id = id;
ProcessId = processId;
BusNames = busNames ?? new List<String>();
}
public Boolean Matches(String busNameOrId)
{
return Id == busNameOrId || BusNames.Contains(busNameOrId);
}
}