Пример #1
0
 /// <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();
 }
Пример #2
0
        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);
        }
Пример #3
0
 /// <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();
 }