mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
fix: remove StringEnumConverter
This commit is contained in:
@@ -14,11 +14,21 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
public class CurrentSourcesMessenger : MessengerBase
|
public class CurrentSourcesMessenger : MessengerBase
|
||||||
{
|
{
|
||||||
private readonly ICurrentSources sourceDevice;
|
private readonly ICurrentSources sourceDevice;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="CurrentSourcesMessenger"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="key">The key.</param>
|
||||||
|
/// <param name="messagePath">The message path.</param>
|
||||||
|
/// <param name="device">The device.</param>
|
||||||
public CurrentSourcesMessenger(string key, string messagePath, ICurrentSources device) : base(key, messagePath, device as IKeyName)
|
public CurrentSourcesMessenger(string key, string messagePath, ICurrentSources device) : base(key, messagePath, device as IKeyName)
|
||||||
{
|
{
|
||||||
sourceDevice = device;
|
sourceDevice = device;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Registers the actions for the messenger.
|
||||||
|
/// </summary>
|
||||||
protected override void RegisterActions()
|
protected override void RegisterActions()
|
||||||
{
|
{
|
||||||
base.RegisterActions();
|
base.RegisterActions();
|
||||||
@@ -55,7 +65,6 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
/// Gets or sets the CurrentSourceKey
|
/// Gets or sets the CurrentSourceKey
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("currentSourceKey", NullValueHandling = NullValueHandling.Ignore)]
|
[JsonProperty("currentSourceKey", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
[JsonConverter(typeof(StringEnumConverter))]
|
|
||||||
public Dictionary<eRoutingSignalType, string> CurrentSourceKeys { get; set; }
|
public Dictionary<eRoutingSignalType, string> CurrentSourceKeys { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -728,6 +728,8 @@ namespace PepperDash.Essentials
|
|||||||
var messenger = new CurrentSourcesMessenger($"{device.Key}-currentSources-{Key}", $"/device/{device.Key}", currentSources);
|
var messenger = new CurrentSourcesMessenger($"{device.Key}-currentSources-{Key}", $"/device/{device.Key}", currentSources);
|
||||||
|
|
||||||
AddDefaultDeviceMessenger(messenger);
|
AddDefaultDeviceMessenger(messenger);
|
||||||
|
|
||||||
|
messengerAdded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (device is ISwitchedOutput switchedDevice)
|
if (device is ISwitchedOutput switchedDevice)
|
||||||
|
|||||||
Reference in New Issue
Block a user