mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
feat: enhance routing and messaging logic with improved source handling and batch processing capabilities
This commit is contained in:
parent
a732c5e08e
commit
f4fe8eff90
10 changed files with 214 additions and 76 deletions
|
|
@ -42,12 +42,10 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||
{
|
||||
// need to copy the dictionaries to avoid enumeration issues
|
||||
var currentSourceKeys = sourceDevice.CurrentSourceKeys.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
|
||||
var currentSources = sourceDevice.CurrentSources.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
|
||||
|
||||
PostStatusMessage(JToken.FromObject(new
|
||||
{
|
||||
currentSourceKeys,
|
||||
currentSources,
|
||||
}));
|
||||
};
|
||||
}
|
||||
|
|
@ -57,7 +55,6 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||
var message = new CurrentSourcesStateMessage
|
||||
{
|
||||
CurrentSourceKeys = sourceDevice.CurrentSourceKeys,
|
||||
CurrentSources = sourceDevice.CurrentSources
|
||||
};
|
||||
|
||||
PostStatusMessage(message, id);
|
||||
|
|
@ -75,11 +72,5 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||
[JsonProperty("currentSourceKeys", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public Dictionary<eRoutingSignalType, string> CurrentSourceKeys { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the CurrentSource
|
||||
/// </summary>
|
||||
[JsonProperty("currentSources")]
|
||||
public Dictionary<eRoutingSignalType, IRoutingSource> CurrentSources { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue