|
436 | 436 | {
|
437 | 437 | ["key"] = "isHardCodedValue",
|
438 | 438 | ["value"] = "true",
|
439 |
| - ["notes"] = "database name" |
| 439 | + ["notes"] = "Hard-coded value" |
440 | 440 | };
|
441 | 441 |
|
442 | 442 | // Extensions
|
|
495 | 495 |
|
496 | 496 | #endregion
|
497 | 497 |
|
| 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 | + |
498 | 550 | dataObjectMappingJsonArray.Add(jsonObjectDataObjectMapping);
|
499 | 551 | }
|
500 | 552 |
|
|
0 commit comments