From 85c58cafc031ccc53c5215caeebe96cbe367584d Mon Sep 17 00:00:00 2001 From: adam Date: Wed, 30 Oct 2024 17:35:00 -0400 Subject: [PATCH] populate expando seems to --- Deployment/ConfigurationBootstrapper.cs | 1 + deployment.tests/ConfigTests.cs | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Deployment/ConfigurationBootstrapper.cs b/Deployment/ConfigurationBootstrapper.cs index 979be10..991c6c4 100644 --- a/Deployment/ConfigurationBootstrapper.cs +++ b/Deployment/ConfigurationBootstrapper.cs @@ -149,6 +149,7 @@ namespace greyn.Deployment Console.WriteLine($"ostensibly, succeeded? {addTry2}"); break; default: + Console.WriteLine($"type I don't know how to handle ({memberInfo.MemberType})"); break; } diff --git a/deployment.tests/ConfigTests.cs b/deployment.tests/ConfigTests.cs index 1c8b536..8c70791 100644 --- a/deployment.tests/ConfigTests.cs +++ b/deployment.tests/ConfigTests.cs @@ -350,10 +350,10 @@ public class ConfigTests { var actualConfig = parse("{}"); greyn.Deployment.ConfigurationBootstrapper.populateExpando(new AConfigurationType(), ref actualConfig); - var casted = (IDictionary)actualConfig; + dynamic casted = actualConfig; Console.WriteLine(JsonConvert.SerializeObject(casted, Formatting.Indented)); - var subtypeCasted = (IDictionary)casted["subtyped"]; - Console.WriteLine(subtypeCasted["aValueTypeButNotAField"]); + + Console.WriteLine(casted.subtyped.aValueTypeButNotAField); Assert.Pass(); } [Test]