Skip to content

Commit 505434b

Browse files
committed
Update Program.cs
1 parent 01bff44 commit 505434b

File tree

1 file changed

+53
-1
lines changed
  • DataWarehouseAutomation/SchemaJsonConverter

1 file changed

+53
-1
lines changed

DataWarehouseAutomation/SchemaJsonConverter/Program.cs

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@
436436
{
437437
["key"] = "isHardCodedValue",
438438
["value"] = "true",
439-
["notes"] = "database name"
439+
["notes"] = "Hard-coded value"
440440
};
441441

442442
// Extensions
@@ -495,6 +495,58 @@
495495

496496
#endregion
497497

498+
#region Extension
499+
500+
try
501+
{
502+
var extensionArray = new JsonArray();
503+
504+
if (jsonObjectDataObjectMapping["extensions"] != null)
505+
{
506+
// Use the existing values.
507+
extensionArray = jsonObjectDataObjectMapping["extensions"]?.AsArray();
508+
}
509+
else
510+
{
511+
// Create a new property.
512+
jsonObjectDataObjectMapping.Add("extensions", extensionArray);
513+
}
514+
515+
// Create a control framework extension.
516+
var extension = new JsonObject()
517+
{
518+
["key"] = "hasControlFramework",
519+
["value"] = "true",
520+
["notes"] = "Integration with Control Framework"
521+
};
522+
extensionArray.Add(extension);
523+
524+
var extensionControlFrameworkDataStore = new JsonObject()
525+
{
526+
["key"] = "controlFrameworkDataStore",
527+
["value"] = "900_Direct_Framework",
528+
["notes"] = "Control Framework data store"
529+
};
530+
extensionArray.Add(extensionControlFrameworkDataStore);
531+
532+
var extensionControlFrameworkLocation = new JsonObject()
533+
{
534+
["key"] = "controlFrameworkLocation",
535+
["value"] = "omd",
536+
["notes"] = "Control Framework location"
537+
};
538+
extensionArray.Add(extensionControlFrameworkLocation);
539+
540+
541+
jsonObjectDataObjectMapping["extensions"] = extensionArray;
542+
}
543+
catch (Exception ex)
544+
{
545+
Console.WriteLine(ex.Message);
546+
}
547+
548+
#endregion
549+
498550
dataObjectMappingJsonArray.Add(jsonObjectDataObjectMapping);
499551
}
500552

0 commit comments

Comments
 (0)