/// <summary> /// Initializes a new instance of the SettingsEntity.Model class. /// </summary> /// <param name="key">The settings key.</param> /// <param name="siteId">The site identifier.</param> /// <param name="siteConfig">The site settings configuration data.</param> /// <param name="globalConfig">The global settings configuration data.</param> public Model(string key, string siteId, JsonObjectNode siteConfig, JsonObjectNode globalConfig = null) { Key = key; SiteId = siteId; SiteConfigString = siteConfig?.ToString(); GlobalConfigString = globalConfig?.ToString(); }
public void ToString_KeysWithEscapeSequences() { // Arrange var node = new JsonObjectNode(); node["Simple Key"] = null; node["Hello\nWorld!"] = null; // Act string result = node.ToString(); // Assert string expectedResult = File.ReadAllText("ToString_KeysWithEscapeSequences.json"); Assert.AreEqual(expectedResult, result); }
/// <summary> /// Initializes a new instance of the SettingsEntity.Model class. /// </summary> /// <param name="key">The settings key.</param> /// <param name="globalConfig">The global settings configuration data.</param> public Model(string key, JsonObjectNode globalConfig) { Key = key; GlobalConfigString = globalConfig?.ToString(); }