fix: remove StringEnumConverter

This commit is contained in:
Andrew Welker
2025-07-29 23:01:13 -05:00
parent e03874a7a9
commit fd1ba345aa
2 changed files with 12 additions and 1 deletions

View File

@@ -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; }

View File

@@ -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)