Implemented the remaining default values for the new configuration section with tests.

This commit is contained in:
Shannon
2013-09-12 19:12:21 +10:00
parent 8990a2fe61
commit 5aed53162e
26 changed files with 306 additions and 124 deletions

View File

@@ -4,11 +4,18 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
{
internal class DeveloperElement : ConfigurationElement
{
private AppCodeFileExtensionsElement _default;
[ConfigurationProperty("appCodeFileExtensions")]
internal AppCodeFileExtensionsElement AppCodeFileExtensions
{
get
{
if (_default != null)
{
return _default;
}
//here we need to check if this element is defined, if it is not then we'll setup the defaults
var prop = Properties["appCodeFileExtensions"];
var autoFill = this[prop] as ConfigurationElement;
@@ -19,12 +26,12 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
new FileExtensionElement {RawValue = "cs"},
new FileExtensionElement {RawValue = "vb"}
};
var element = new AppCodeFileExtensionsElement
_default = new AppCodeFileExtensionsElement
{
AppCodeFileExtensionsCollection = collection
};
return element;
return _default;
}
return (AppCodeFileExtensionsElement)base["appCodeFileExtensions"];