mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 12:06:58 +00:00
Changes to correct datatype for joinMaps in config
This commit is contained in:
parent
f6059e249f
commit
52494ca13e
4 changed files with 9 additions and 6 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -388,3 +388,4 @@ MigrationBackup/
|
|||
|
||||
# Fody - auto-generated XML schema
|
||||
FodyWeavers.xsd
|
||||
essentials-framework/Essentials Interfaces/PepperDash_Essentials_Interfaces/PepperDash_Essentials_Interfaces.csproj
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ using Newtonsoft.Json;
|
|||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Config
|
||||
{
|
||||
/// <summary>
|
||||
|
|
@ -27,7 +29,7 @@ namespace PepperDash.Essentials.Core.Config
|
|||
public List<TieLineConfig> TieLines { get; set; }
|
||||
|
||||
[JsonProperty("joinMaps")]
|
||||
public Dictionary<string, string> JoinMaps { get; set; }
|
||||
public Dictionary<string, JToken> JoinMaps { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Checks SourceLists for a given list and returns it if found. Otherwise, returns null
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||
new JoinMetadata { Description = "Info - Processor - Hostname", JoinCapabilities = eJoinCapabilities.ToFusion, JoinType = eJoinType.Serial });
|
||||
|
||||
[JoinName("ProcessorDomain")]
|
||||
public JoinDataComplete ProcessorDomain = new JoinDataComplete(new JoinData { JoinNumber = 55, JoinSpan = 1, AttributeName = "Info - Processor - Domain" },
|
||||
public JoinDataComplete ProcessorDomain = new JoinDataComplete(new JoinData { JoinNumber = 54, JoinSpan = 1, AttributeName = "Info - Processor - Domain" },
|
||||
new JoinMetadata { Description = "Info - Processor - Domain", JoinCapabilities = eJoinCapabilities.ToFusion, JoinType = eJoinType.Serial });
|
||||
|
||||
[JoinName("ProcessorDns1")]
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ namespace PepperDash.Essentials.Core
|
|||
|
||||
var joinMap = ConfigReader.ConfigObject.JoinMaps[joinMapKey];
|
||||
|
||||
return joinMap;
|
||||
return joinMap.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -48,11 +48,11 @@ namespace PepperDash.Essentials.Core
|
|||
if (string.IsNullOrEmpty(joinMapKey))
|
||||
return null;
|
||||
|
||||
var joinMapSerialzed = ConfigReader.ConfigObject.JoinMaps[joinMapKey];
|
||||
var joinMapJToken = ConfigReader.ConfigObject.JoinMaps[joinMapKey];
|
||||
|
||||
if (joinMapSerialzed == null) return null;
|
||||
if (joinMapJToken == null) return null;
|
||||
|
||||
var joinMapData = JsonConvert.DeserializeObject<Dictionary<string, JoinData>>(joinMapSerialzed);
|
||||
var joinMapData = joinMapJToken.ToObject<Dictionary<string, JoinData>>();
|
||||
|
||||
return joinMapData;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue