diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/AppCodeFileExtensionsCollection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/AppCodeFileExtensionsCollection.cs index a52c0dde56..95510f094b 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/AppCodeFileExtensionsCollection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/AppCodeFileExtensionsCollection.cs @@ -3,7 +3,7 @@ using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class AppCodeFileExtensionsCollection : ConfigurationElementCollection, IEnumerable + internal class AppCodeFileExtensionsCollection : ConfigurationElementCollection, IEnumerable { internal void Add(FileExtensionElement element) { @@ -20,11 +20,11 @@ namespace Umbraco.Core.Configuration.UmbracoSettings return ((FileExtensionElement)element).Value; } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { for (var i = 0; i < Count; i++) { - yield return BaseGet(i) as FileExtensionElement; + yield return BaseGet(i) as IFileExtension; } } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/AppCodeFileExtensionsElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/AppCodeFileExtensionsElement.cs index ad839de174..de90cada81 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/AppCodeFileExtensionsElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/AppCodeFileExtensionsElement.cs @@ -1,15 +1,21 @@ -using System.Configuration; +using System.Collections.Generic; +using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class AppCodeFileExtensionsElement : ConfigurationElement + internal class AppCodeFileExtensionsElement : ConfigurationElement, IAppCodeFileExtensions { [ConfigurationCollection(typeof(AppCodeFileExtensionsCollection), AddItemName = "ext")] [ConfigurationProperty("", IsDefaultCollection = true)] - public AppCodeFileExtensionsCollection AppCodeFileExtensionsCollection + internal AppCodeFileExtensionsCollection AppCodeFileExtensionsCollection { get { return (AppCodeFileExtensionsCollection)base[""]; } set { base[""] = value; } } + + IEnumerable IAppCodeFileExtensions.AppCodeFileExtensions + { + get { return AppCodeFileExtensionsCollection; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/CharCollection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/CharCollection.cs index 58a544e073..f7ba4de35d 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/CharCollection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/CharCollection.cs @@ -3,7 +3,7 @@ using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class CharCollection : ConfigurationElementCollection, IEnumerable + internal class CharCollection : ConfigurationElementCollection, IEnumerable { internal void Add(CharElement c) { @@ -20,11 +20,11 @@ namespace Umbraco.Core.Configuration.UmbracoSettings return ((CharElement)element).Char; } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { for (var i = 0; i < Count; i++) { - yield return BaseGet(i) as CharElement; + yield return BaseGet(i) as IChar; } } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/CharElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/CharElement.cs index 7e98b8e266..f785bf616c 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/CharElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/CharElement.cs @@ -1,20 +1,32 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class CharElement : InnerTextConfigurationElement + internal class CharElement : InnerTextConfigurationElement, IChar { private string _char; private string _replacement; - public string Char + internal string Char { get { return _char ?? (_char = (string)RawXml.Attribute("org")); } set { _char = value; } } - public string Replacement + internal string Replacement { get { return _replacement ?? (_replacement = Value); } set { _replacement = value; } } + + string IChar.Char + { + get { return Char; } + + } + + string IChar.Replacement + { + get { return Replacement; } + + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs index 3b3e7233f0..cb57b08492 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs @@ -1,8 +1,9 @@ -using System.Configuration; +using System.Collections.Generic; +using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class ContentElement : ConfigurationElement + internal class ContentElement : ConfigurationElement, IContent { [ConfigurationProperty("imaging")] internal ContentImagingElement Imaging @@ -53,19 +54,19 @@ namespace Umbraco.Core.Configuration.UmbracoSettings } [ConfigurationProperty("errors", IsRequired = true)] - public ContentErrorsElement Errors + internal ContentErrorsElement Errors { get { return (ContentErrorsElement) base["errors"]; } } [ConfigurationProperty("notifications", IsRequired = true)] - public NotificationsElement Notifications + internal NotificationsElement Notifications { get { return (NotificationsElement)base["notifications"]; } } [ConfigurationProperty("ensureUniqueNaming")] - public InnerTextConfigurationElement EnsureUniqueNaming + internal InnerTextConfigurationElement EnsureUniqueNaming { get { @@ -77,7 +78,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings } [ConfigurationProperty("TidyEditorContent")] - public InnerTextConfigurationElement TidyEditorContent + internal InnerTextConfigurationElement TidyEditorContent { get { @@ -89,7 +90,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings } [ConfigurationProperty("TidyCharEncoding")] - public InnerTextConfigurationElement TidyCharEncoding + internal InnerTextConfigurationElement TidyCharEncoding { get { @@ -101,7 +102,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings } [ConfigurationProperty("XmlCacheEnabled")] - public InnerTextConfigurationElement XmlCacheEnabled + internal InnerTextConfigurationElement XmlCacheEnabled { get { @@ -113,7 +114,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings } [ConfigurationProperty("ContinouslyUpdateXmlDiskCache")] - public InnerTextConfigurationElement ContinouslyUpdateXmlDiskCache + internal InnerTextConfigurationElement ContinouslyUpdateXmlDiskCache { get { @@ -125,7 +126,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings } [ConfigurationProperty("XmlContentCheckForDiskChanges")] - public InnerTextConfigurationElement XmlContentCheckForDiskChanges + internal InnerTextConfigurationElement XmlContentCheckForDiskChanges { get { @@ -137,7 +138,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings } [ConfigurationProperty("EnableSplashWhileLoading")] - public InnerTextConfigurationElement EnableSplashWhileLoading + internal InnerTextConfigurationElement EnableSplashWhileLoading { get { @@ -149,7 +150,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings } [ConfigurationProperty("PropertyContextHelpOption")] - public InnerTextConfigurationElement PropertyContextHelpOption + internal InnerTextConfigurationElement PropertyContextHelpOption { get { @@ -161,7 +162,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings } [ConfigurationProperty("UseLegacyXmlSchema")] - public InnerTextConfigurationElement UseLegacyXmlSchema + internal InnerTextConfigurationElement UseLegacyXmlSchema { get { @@ -173,7 +174,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings } [ConfigurationProperty("ForceSafeAliases")] - public InnerTextConfigurationElement ForceSafeAliases + internal InnerTextConfigurationElement ForceSafeAliases { get { @@ -185,7 +186,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings } [ConfigurationProperty("PreviewBadge")] - public InnerTextConfigurationElement PreviewBadge + internal InnerTextConfigurationElement PreviewBadge { get { @@ -197,7 +198,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings } [ConfigurationProperty("UmbracoLibraryCacheDuration")] - public InnerTextConfigurationElement UmbracoLibraryCacheDuration + internal InnerTextConfigurationElement UmbracoLibraryCacheDuration { get { @@ -210,7 +211,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings } [ConfigurationProperty("MacroErrors")] - public InnerTextConfigurationElement MacroErrors + internal InnerTextConfigurationElement MacroErrors { get { @@ -223,7 +224,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings } [ConfigurationProperty("DocumentTypeIconList")] - public InnerTextConfigurationElement DocumentTypeIconList + internal InnerTextConfigurationElement DocumentTypeIconList { get { @@ -235,7 +236,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings } [ConfigurationProperty("disallowedUploadFiles")] - public OptionalCommaDelimitedConfigurationElement DisallowedUploadFiles + internal CommaDelimitedConfigurationElement DisallowedUploadFiles { get { @@ -282,5 +283,130 @@ namespace Umbraco.Core.Configuration.UmbracoSettings "Textstring"); } } + + IContentImaging IContent.Imaging + { + get { return Imaging; } + } + + IContentScriptEditor IContent.ScriptEditor + { + get { return ScriptEditor; } + } + + bool IContent.EnableCanvasEditing + { + get { return EnableCanvasEditing; } + } + + bool IContent.ResolveUrlsFromTextString + { + get { return ResolveUrlsFromTextString; } + } + + bool IContent.UploadAllowDirectories + { + get { return UploadAllowDirectories; } + } + + IContentErrors IContent.Errors + { + get { return Errors; } + } + + INotifications IContent.Notifications + { + get { return Notifications; } + } + + bool IContent.EnsureUniqueNaming + { + get { return EnsureUniqueNaming; } + } + + bool IContent.TidyEditorContent + { + get { return TidyEditorContent; } + } + + string IContent.TidyCharEncoding + { + get { return TidyCharEncoding; } + } + + bool IContent.XmlCacheEnabled + { + get { return XmlCacheEnabled; } + } + + bool IContent.ContinouslyUpdateXmlDiskCache + { + get { return ContinouslyUpdateXmlDiskCache; } + } + + bool IContent.XmlContentCheckForDiskChanges + { + get { return XmlContentCheckForDiskChanges; } + } + + bool IContent.EnableSplashWhileLoading + { + get { return EnableSplashWhileLoading; } + } + + string IContent.PropertyContextHelpOption + { + get { return PropertyContextHelpOption; } + } + + bool IContent.UseLegacyXmlSchema + { + get { return UseLegacyXmlSchema; } + } + + bool IContent.ForceSafeAliases + { + get { return ForceSafeAliases; } + } + + string IContent.PreviewBadge + { + get { return PreviewBadge; } + } + + int IContent.UmbracoLibraryCacheDuration + { + get { return UmbracoLibraryCacheDuration; } + } + + MacroErrorBehaviour IContent.MacroErrors + { + get { return MacroErrors; } + } + + IconPickerBehaviour IContent.DocumentTypeIconList + { + get { return DocumentTypeIconList; } + } + + IEnumerable IContent.DisallowedUploadFiles + { + get { return DisallowedUploadFiles; } + } + + bool IContent.CloneXmlContent + { + get { return CloneXmlContent; } + } + + bool IContent.GlobalPreviewStorageEnabled + { + get { return GlobalPreviewStorageEnabled; } + } + + string IContent.DefaultDocumentTypeProperty + { + get { return DefaultDocumentTypeProperty; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentErrorPageElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentErrorPageElement.cs index 70d44cfad1..e0056ac958 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentErrorPageElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentErrorPageElement.cs @@ -2,7 +2,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class ContentErrorPageElement : InnerTextConfigurationElement + internal class ContentErrorPageElement : InnerTextConfigurationElement, IContentErrorPage { public ContentErrorPageElement(XElement rawXml) : base(rawXml) @@ -14,7 +14,12 @@ namespace Umbraco.Core.Configuration.UmbracoSettings } - internal string Culture + public int ContentId + { + get { return Value; } + } + + public string Culture { get { return (string) RawXml.Attribute("culture"); } set { RawXml.Attribute("culture").Value = value; } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentErrorsElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentErrorsElement.cs index 583a822cdc..598e2f21d3 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentErrorsElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentErrorsElement.cs @@ -1,11 +1,12 @@ -using System.Linq; +using System.Collections.Generic; +using System.Linq; namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class ContentErrorsElement : RawXmlConfigurationElement + internal class ContentErrorsElement : RawXmlConfigurationElement, IContentErrors { - public ContentError404Collection Error404Collection + public IEnumerable Error404Collection { get { diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentImagingAutoFillPropertiesCollection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentImagingAutoFillPropertiesCollection.cs index 88bcc03a63..c8eab4bb05 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentImagingAutoFillPropertiesCollection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentImagingAutoFillPropertiesCollection.cs @@ -3,7 +3,7 @@ using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class ContentImagingAutoFillPropertiesCollection : ConfigurationElementCollection, IEnumerable + internal class ContentImagingAutoFillPropertiesCollection : ConfigurationElementCollection, IEnumerable { protected override ConfigurationElement CreateNewElement() @@ -21,11 +21,11 @@ namespace Umbraco.Core.Configuration.UmbracoSettings BaseAdd(item); } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { for (var i = 0; i < Count; i++) { - yield return BaseGet(i) as ContentImagingAutoFillUploadFieldElement; + yield return BaseGet(i) as IContentImagingAutoFillUploadField; } } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentImagingAutoFillUploadFieldElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentImagingAutoFillUploadFieldElement.cs index 82ce242f4c..bd0e7a279e 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentImagingAutoFillUploadFieldElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentImagingAutoFillUploadFieldElement.cs @@ -2,13 +2,13 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class ContentImagingAutoFillUploadFieldElement : ConfigurationElement + internal class ContentImagingAutoFillUploadFieldElement : ConfigurationElement, IContentImagingAutoFillUploadField { /// /// Allow setting internally so we can create a default /// [ConfigurationProperty("alias", IsKey = true, IsRequired = true)] - internal string Alias + public string Alias { get { return (string)this["alias"]; } set { this["alias"] = value; } @@ -61,5 +61,31 @@ namespace Umbraco.Core.Configuration.UmbracoSettings "umbracoExtension"); } } + + string IContentImagingAutoFillUploadField.Alias + { + get { return Alias; } + + } + + string IContentImagingAutoFillUploadField.WidthFieldAlias + { + get { return WidthFieldAlias; } + } + + string IContentImagingAutoFillUploadField.HeightFieldAlias + { + get { return HeightFieldAlias; } + } + + string IContentImagingAutoFillUploadField.LengthFieldAlias + { + get { return LengthFieldAlias; } + } + + string IContentImagingAutoFillUploadField.ExtensionFieldAlias + { + get { return ExtensionFieldAlias; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentImagingElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentImagingElement.cs index 1eaf11e58a..80345222d0 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentImagingElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentImagingElement.cs @@ -1,8 +1,9 @@ -using System.Configuration; +using System.Collections.Generic; +using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class ContentImagingElement : ConfigurationElement + internal class ContentImagingElement : ConfigurationElement, IContentImaging { [ConfigurationProperty("imageFileTypes")] internal CommaDelimitedConfigurationElement ImageFileTypes @@ -31,8 +32,8 @@ namespace Umbraco.Core.Configuration.UmbracoSettings private ContentImagingAutoFillPropertiesCollection _defaultImageAutoFill; [ConfigurationCollection(typeof(ContentImagingAutoFillPropertiesCollection), AddItemName = "uploadField")] - [ConfigurationProperty("autoFillImageProperties", IsDefaultCollection = true)] - public ContentImagingAutoFillPropertiesCollection ImageAutoFillProperties + [ConfigurationProperty("autoFillImageProperties", IsDefaultCollection = true)] + internal ContentImagingAutoFillPropertiesCollection ImageAutoFillProperties { get { @@ -60,5 +61,20 @@ namespace Umbraco.Core.Configuration.UmbracoSettings } } + + IEnumerable IContentImaging.ImageFileTypes + { + get { return ImageFileTypes; } + } + + IEnumerable IContentImaging.AllowedAttributes + { + get { return AllowedAttributes; } + } + + IEnumerable IContentImaging.ImageAutoFillProperties + { + get { return ImageAutoFillProperties; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentScriptEditorElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentScriptEditorElement.cs index 031ae01b7f..1c7898f596 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentScriptEditorElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentScriptEditorElement.cs @@ -1,8 +1,9 @@ -using System.Configuration; +using System.Collections.Generic; +using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class ContentScriptEditorElement : ConfigurationElement + internal class ContentScriptEditorElement : ConfigurationElement, IContentScriptEditor { [ConfigurationProperty("scriptFolderPath")] internal InnerTextConfigurationElement ScriptFolderPath @@ -39,5 +40,20 @@ namespace Umbraco.Core.Configuration.UmbracoSettings false); } } + + string IContentScriptEditor.ScriptFolderPath + { + get { return ScriptFolderPath; } + } + + IEnumerable IContentScriptEditor.ScriptFileTypes + { + get { return ScriptFileTypes; } + } + + bool IContentScriptEditor.DisableScriptEditor + { + get { return DisableScriptEditor; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/DeveloperElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/DeveloperElement.cs index e88e94f754..f2842b2125 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/DeveloperElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/DeveloperElement.cs @@ -2,7 +2,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class DeveloperElement : ConfigurationElement + internal class DeveloperElement : ConfigurationElement, IDeveloper { private AppCodeFileExtensionsElement _default; @@ -37,5 +37,10 @@ namespace Umbraco.Core.Configuration.UmbracoSettings return (AppCodeFileExtensionsElement)base["appCodeFileExtensions"]; } } + + IAppCodeFileExtensions IDeveloper.AppCodeFileExtensions + { + get { return AppCodeFileExtensions; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/DisabledLogTypesCollection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/DisabledLogTypesCollection.cs index cab30596b2..63841b3445 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/DisabledLogTypesCollection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/DisabledLogTypesCollection.cs @@ -3,7 +3,7 @@ using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class DisabledLogTypesCollection : ConfigurationElementCollection, IEnumerable + internal class DisabledLogTypesCollection : ConfigurationElementCollection, IEnumerable { protected override ConfigurationElement CreateNewElement() { @@ -15,11 +15,11 @@ namespace Umbraco.Core.Configuration.UmbracoSettings return ((LogTypeElement)element).Value; } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { for (var i = 0; i < Count; i++) { - yield return BaseGet(i) as LogTypeElement; + yield return BaseGet(i) as ILogType; } } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/DistributedCallElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/DistributedCallElement.cs index e7764cc369..5a61b64b0f 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/DistributedCallElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/DistributedCallElement.cs @@ -1,11 +1,12 @@ -using System.Configuration; +using System.Collections.Generic; +using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class DistributedCallElement : ConfigurationElement + internal class DistributedCallElement : ConfigurationElement, IDistributedCall { [ConfigurationProperty("enable", DefaultValue = false)] - public bool Enabled + internal bool Enabled { get { return (bool)base["enable"]; } } @@ -24,9 +25,24 @@ namespace Umbraco.Core.Configuration.UmbracoSettings [ConfigurationCollection(typeof(ServerCollection), AddItemName = "server")] [ConfigurationProperty("servers", IsDefaultCollection = true)] - public ServerCollection Servers + internal ServerCollection Servers { get { return (ServerCollection)base["servers"]; } } + + bool IDistributedCall.Enabled + { + get { return Enabled; } + } + + int IDistributedCall.UserId + { + get { return UserId; } + } + + IEnumerable IDistributedCall.Servers + { + get { return Servers; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ExternalLoggerElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ExternalLoggerElement.cs index 8d8d7b3f0d..73c6a0c02e 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ExternalLoggerElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ExternalLoggerElement.cs @@ -2,7 +2,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class ExternalLoggerElement : ConfigurationElement + internal class ExternalLoggerElement : ConfigurationElement, IExternalLogger { [ConfigurationProperty("assembly")] internal string Assembly @@ -21,5 +21,20 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { get { return (bool)base["logAuditTrail"]; } } + + string IExternalLogger.Assembly + { + get { return Assembly; } + } + + string IExternalLogger.Type + { + get { return Type; } + } + + bool IExternalLogger.LogAuditTrail + { + get { return LogAuditTrail; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/FileExtensionElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/FileExtensionElement.cs index 76b458fe5b..939b91cd0f 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/FileExtensionElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/FileExtensionElement.cs @@ -2,14 +2,20 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class FileExtensionElement : InnerTextConfigurationElement + internal class FileExtensionElement : InnerTextConfigurationElement, IFileExtension { public FileExtensionElement() { } - public FileExtensionElement(XElement rawXml) : base(rawXml) + internal FileExtensionElement(XElement rawXml) + : base(rawXml) { } + + string IFileExtension.Extension + { + get { return Value; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/HelpElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/HelpElement.cs index fd63f6bb06..1d6fee490c 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/HelpElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/HelpElement.cs @@ -1,8 +1,9 @@ -using System.Configuration; +using System.Collections.Generic; +using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class HelpElement : ConfigurationElement + internal class HelpElement : ConfigurationElement, IHelp { [ConfigurationProperty("defaultUrl", DefaultValue = "http://our.umbraco.org/wiki/umbraco-help/{0}/{1}")] public string DefaultUrl @@ -16,5 +17,15 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { get { return (LinksCollection) base[""]; } } + + string IHelp.DefaultUrl + { + get { return DefaultUrl; } + } + + IEnumerable IHelp.Links + { + get { return Links; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IAppCodeFileExtensions.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IAppCodeFileExtensions.cs new file mode 100644 index 0000000000..87e3c76413 --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IAppCodeFileExtensions.cs @@ -0,0 +1,9 @@ +using System.Collections.Generic; + +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IAppCodeFileExtensions + { + IEnumerable AppCodeFileExtensions { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IChar.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IChar.cs new file mode 100644 index 0000000000..7b5775cc48 --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IChar.cs @@ -0,0 +1,8 @@ +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IChar + { + string Char { get; } + string Replacement { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IContent.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IContent.cs new file mode 100644 index 0000000000..3ed58b18b9 --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IContent.cs @@ -0,0 +1,57 @@ +using System.Collections.Generic; + +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IContent + { + IContentImaging Imaging { get; } + + IContentScriptEditor ScriptEditor { get; } + + bool EnableCanvasEditing { get; } + + bool ResolveUrlsFromTextString { get; } + + bool UploadAllowDirectories { get; } + + IContentErrors Errors { get; } + + INotifications Notifications { get; } + + bool EnsureUniqueNaming { get; } + + bool TidyEditorContent { get; } + + string TidyCharEncoding { get; } + + bool XmlCacheEnabled { get; } + + bool ContinouslyUpdateXmlDiskCache { get; } + + bool XmlContentCheckForDiskChanges { get; } + + bool EnableSplashWhileLoading { get; } + + string PropertyContextHelpOption { get; } + + bool UseLegacyXmlSchema { get; } + + bool ForceSafeAliases { get; } + + string PreviewBadge { get; } + + int UmbracoLibraryCacheDuration { get; } + + MacroErrorBehaviour MacroErrors { get; } + + IconPickerBehaviour DocumentTypeIconList { get; } + + IEnumerable DisallowedUploadFiles { get; } + + bool CloneXmlContent { get; } + + bool GlobalPreviewStorageEnabled { get; } + + string DefaultDocumentTypeProperty { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IContentErrorPage.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentErrorPage.cs new file mode 100644 index 0000000000..3253d77bed --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentErrorPage.cs @@ -0,0 +1,8 @@ +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IContentErrorPage + { + int ContentId { get; } + string Culture { get; set; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IContentErrors.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentErrors.cs new file mode 100644 index 0000000000..5fa3e9cf28 --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentErrors.cs @@ -0,0 +1,9 @@ +using System.Collections.Generic; + +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IContentErrors + { + IEnumerable Error404Collection { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IContentImaging.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentImaging.cs new file mode 100644 index 0000000000..2010a4da4f --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentImaging.cs @@ -0,0 +1,13 @@ +using System.Collections.Generic; + +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IContentImaging + { + IEnumerable ImageFileTypes { get; } + + IEnumerable AllowedAttributes { get; } + + IEnumerable ImageAutoFillProperties { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IContentImagingAutoFillUploadField.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentImagingAutoFillUploadField.cs new file mode 100644 index 0000000000..69eb2c7238 --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentImagingAutoFillUploadField.cs @@ -0,0 +1,18 @@ +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IContentImagingAutoFillUploadField + { + /// + /// Allow setting internally so we can create a default + /// + string Alias { get; } + + string WidthFieldAlias { get; } + + string HeightFieldAlias { get; } + + string LengthFieldAlias { get; } + + string ExtensionFieldAlias { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IContentScriptEditor.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentScriptEditor.cs new file mode 100644 index 0000000000..67165802a9 --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentScriptEditor.cs @@ -0,0 +1,13 @@ +using System.Collections.Generic; + +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IContentScriptEditor + { + string ScriptFolderPath { get; } + + IEnumerable ScriptFileTypes { get; } + + bool DisableScriptEditor { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IDeveloper.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IDeveloper.cs new file mode 100644 index 0000000000..c11d072e6d --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IDeveloper.cs @@ -0,0 +1,7 @@ +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IDeveloper + { + IAppCodeFileExtensions AppCodeFileExtensions { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IDistributedCall.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IDistributedCall.cs new file mode 100644 index 0000000000..dde70ecc20 --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IDistributedCall.cs @@ -0,0 +1,13 @@ +using System.Collections.Generic; + +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IDistributedCall + { + bool Enabled { get; } + + int UserId { get; } + + IEnumerable Servers { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IExternalLogger.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IExternalLogger.cs new file mode 100644 index 0000000000..ffb7835cfd --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IExternalLogger.cs @@ -0,0 +1,13 @@ +using System.Configuration; + +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IExternalLogger + { + string Assembly { get; } + + string Type { get; } + + bool LogAuditTrail { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IFileExtension.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IFileExtension.cs new file mode 100644 index 0000000000..91629f50ce --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IFileExtension.cs @@ -0,0 +1,7 @@ +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IFileExtension + { + string Extension { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IHelp.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IHelp.cs new file mode 100644 index 0000000000..d5822ebffe --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IHelp.cs @@ -0,0 +1,11 @@ +using System.Collections.Generic; + +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IHelp + { + string DefaultUrl { get; } + + IEnumerable Links { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ILink.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ILink.cs new file mode 100644 index 0000000000..2085d29325 --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ILink.cs @@ -0,0 +1,15 @@ +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface ILink + { + string Application { get; } + + string ApplicationUrl { get; } + + string Language { get; } + + string UserType { get; } + + string HelpUrl { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ILogType.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ILogType.cs new file mode 100644 index 0000000000..68df770be0 --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ILogType.cs @@ -0,0 +1,7 @@ +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface ILogType + { + string LogTypeAlias { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ILogging.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ILogging.cs new file mode 100644 index 0000000000..b5525f3f52 --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ILogging.cs @@ -0,0 +1,23 @@ +using System.Collections.Generic; + +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface ILogging + { + bool AutoCleanLogs { get; } + + bool EnableLogging { get; } + + bool EnableAsyncLogging { get; } + + int CleaningMiliseconds { get; } + + int MaxLogAge { get; } + + IEnumerable DisabledLogTypes { get; } + + IExternalLogger ExternalLogger { get; } + + bool ExternalLoggerIsConfigured { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/INotDynamicXmlDocument.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/INotDynamicXmlDocument.cs new file mode 100644 index 0000000000..92c6ea990c --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/INotDynamicXmlDocument.cs @@ -0,0 +1,7 @@ +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface INotDynamicXmlDocument + { + string Element { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/INotifications.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/INotifications.cs new file mode 100644 index 0000000000..90db1a8f0e --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/INotifications.cs @@ -0,0 +1,8 @@ +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface INotifications + { + string EmailAddress { get; } + bool DisableHtmlEmail { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IProviders.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IProviders.cs new file mode 100644 index 0000000000..60bf0e9687 --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IProviders.cs @@ -0,0 +1,9 @@ +using System.Configuration; + +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IProviders + { + IUserProvider Users { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IRazor.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IRazor.cs new file mode 100644 index 0000000000..10f70dcf55 --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IRazor.cs @@ -0,0 +1,11 @@ +using System.Collections.Generic; + +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IRazor + { + IEnumerable NotDynamicXmlDocumentElements { get; } + + IEnumerable DataTypeModelStaticMappings { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IRazorStaticMapping.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IRazorStaticMapping.cs new file mode 100644 index 0000000000..2566866982 --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IRazorStaticMapping.cs @@ -0,0 +1,12 @@ +using System; + +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IRazorStaticMapping + { + Guid DataTypeGuid { get; } + string NodeTypeAlias { get; } + string DocumentTypeAlias { get; } + string MappingName { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IRepositories.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IRepositories.cs new file mode 100644 index 0000000000..260aa39704 --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IRepositories.cs @@ -0,0 +1,9 @@ +using System.Collections.Generic; + +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IRepositories + { + IEnumerable Repositories { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IRepository.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IRepository.cs new file mode 100644 index 0000000000..f7815e4103 --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IRepository.cs @@ -0,0 +1,10 @@ +using System; + +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IRepository + { + string Name { get; } + Guid Id { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IRequestHandler.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IRequestHandler.cs new file mode 100644 index 0000000000..2d550d3b49 --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IRequestHandler.cs @@ -0,0 +1,11 @@ +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IRequestHandler + { + bool UseDomainPrefixes { get; } + + bool AddTrailingSlash { get; } + + IUrlReplacing UrlReplacing { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IScheduledTask.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IScheduledTask.cs new file mode 100644 index 0000000000..4be62fbd17 --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IScheduledTask.cs @@ -0,0 +1,13 @@ +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IScheduledTask + { + string Alias { get; } + + bool Log { get; } + + int Interval { get; } + + string Url { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IScheduledTasks.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IScheduledTasks.cs new file mode 100644 index 0000000000..d28ac97895 --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IScheduledTasks.cs @@ -0,0 +1,9 @@ +using System.Collections.Generic; + +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IScheduledTasks + { + IEnumerable Tasks { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IScripting.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IScripting.cs new file mode 100644 index 0000000000..6b541b2371 --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IScripting.cs @@ -0,0 +1,7 @@ +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IScripting + { + IRazor Razor { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ISecurity.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ISecurity.cs new file mode 100644 index 0000000000..a55f7c23e6 --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ISecurity.cs @@ -0,0 +1,13 @@ +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface ISecurity + { + bool KeepUserLoggedIn { get; } + + bool HideDisabledUsersInBackoffice { get; } + + string AuthCookieName { get; } + + string AuthCookieDomain { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IServerElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IServerElement.cs new file mode 100644 index 0000000000..099146f1ca --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IServerElement.cs @@ -0,0 +1,9 @@ +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IServerElement + { + string ForcePortnumber { get; } + string ForceProtocol { get; } + string ServerAddress { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ITemplates.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ITemplates.cs new file mode 100644 index 0000000000..77656e421a --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ITemplates.cs @@ -0,0 +1,13 @@ +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface ITemplates + { + bool UseAspNetMasterPages { get; } + + bool EnableSkinSupport { get; } + + RenderingEngine DefaultRenderingEngine { get; } + + bool EnableTemplateFolders { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IUrlReplacing.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IUrlReplacing.cs new file mode 100644 index 0000000000..54ee16a2b7 --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IUrlReplacing.cs @@ -0,0 +1,11 @@ +using System.Collections.Generic; + +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IUrlReplacing + { + bool RemoveDoubleDashes { get; } + + IEnumerable CharCollection { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IUserProvider.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IUserProvider.cs new file mode 100644 index 0000000000..233a285bea --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IUserProvider.cs @@ -0,0 +1,7 @@ +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IUserProvider + { + string DefaultBackOfficeProvider { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IViewstateMoverModule.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IViewstateMoverModule.cs new file mode 100644 index 0000000000..9450cd6f63 --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IViewstateMoverModule.cs @@ -0,0 +1,7 @@ +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IViewstateMoverModule + { + bool Enable { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IWebRouting.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IWebRouting.cs new file mode 100644 index 0000000000..7b54a022ca --- /dev/null +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IWebRouting.cs @@ -0,0 +1,9 @@ +namespace Umbraco.Core.Configuration.UmbracoSettings +{ + public interface IWebRouting + { + bool TrySkipIisCustomErrors { get; } + + bool InternalRedirectPreservesTemplate { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/LinkElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/LinkElement.cs index f5f7d75ab9..31b4aa3e93 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/LinkElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/LinkElement.cs @@ -2,7 +2,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class LinkElement : ConfigurationElement + internal class LinkElement : ConfigurationElement, ILink { [ConfigurationProperty("application")] internal string Application @@ -33,5 +33,30 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { get { return (string)base["helpUrl"]; } } + + string ILink.Application + { + get { return Application; } + } + + string ILink.ApplicationUrl + { + get { return ApplicationUrl; } + } + + string ILink.Language + { + get { return Language; } + } + + string ILink.UserType + { + get { return UserType; } + } + + string ILink.HelpUrl + { + get { return HelpUrl; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/LinksCollection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/LinksCollection.cs index 30d6920d58..5c317790cb 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/LinksCollection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/LinksCollection.cs @@ -3,7 +3,7 @@ using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class LinksCollection : ConfigurationElementCollection, IEnumerable + internal class LinksCollection : ConfigurationElementCollection, IEnumerable { protected override ConfigurationElement CreateNewElement() { @@ -18,11 +18,11 @@ namespace Umbraco.Core.Configuration.UmbracoSettings + ((LinkElement)element).UserType; } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { for (var i = 0; i < Count; i++) { - yield return BaseGet(i) as LinkElement; + yield return BaseGet(i) as ILink; } } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/LogTypeElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/LogTypeElement.cs index 246bbc3a64..44ca547c8b 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/LogTypeElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/LogTypeElement.cs @@ -1,7 +1,11 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class LogTypeElement : InnerTextConfigurationElement + internal class LogTypeElement : InnerTextConfigurationElement, ILogType { - + + string ILogType.LogTypeAlias + { + get { return Value; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/LoggingElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/LoggingElement.cs index 74ec1973d4..a28d71e9d4 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/LoggingElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/LoggingElement.cs @@ -1,8 +1,9 @@ -using System.Configuration; +using System.Collections.Generic; +using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class LoggingElement : ConfigurationElement + internal class LoggingElement : ConfigurationElement, ILogging { [ConfigurationProperty("autoCleanLogs")] @@ -67,7 +68,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings [ConfigurationCollection(typeof(DisabledLogTypesCollection), AddItemName = "logTypeAlias")] [ConfigurationProperty("disabledLogTypes", IsDefaultCollection = true)] - public DisabledLogTypesCollection DisabledLogTypes + internal DisabledLogTypesCollection DisabledLogTypes { get { return (DisabledLogTypesCollection)base["disabledLogTypes"]; } } @@ -78,7 +79,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings get { return (ExternalLoggerElement) base["externalLogger"]; } } - internal bool ExternalLoggerIsConfigured + public bool ExternalLoggerIsConfigured { get { @@ -92,5 +93,41 @@ namespace Umbraco.Core.Configuration.UmbracoSettings } } + + bool ILogging.AutoCleanLogs + { + get { return AutoCleanLogs; } + } + + bool ILogging.EnableLogging + { + get { return EnableLogging; } + } + + bool ILogging.EnableAsyncLogging + { + get { return EnableAsyncLogging; } + } + + int ILogging.CleaningMiliseconds + { + get { return CleaningMiliseconds; } + } + + int ILogging.MaxLogAge + { + get { return MaxLogAge; } + } + + IEnumerable ILogging.DisabledLogTypes + { + get { return DisabledLogTypes; } + } + + IExternalLogger ILogging.ExternalLogger + { + get { return ExternalLogger; } + } + } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/NotDynamicXmlDocumentElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/NotDynamicXmlDocumentElement.cs index 776d45444c..f6d4d18936 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/NotDynamicXmlDocumentElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/NotDynamicXmlDocumentElement.cs @@ -1,7 +1,10 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class NotDynamicXmlDocumentElement : InnerTextConfigurationElement + internal class NotDynamicXmlDocumentElement : InnerTextConfigurationElement, INotDynamicXmlDocument { - + public string Element + { + get { return Value; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/NotDynamicXmlDocumentElementCollection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/NotDynamicXmlDocumentElementCollection.cs index c50a780c65..ffcd9c81c3 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/NotDynamicXmlDocumentElementCollection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/NotDynamicXmlDocumentElementCollection.cs @@ -3,7 +3,7 @@ using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class NotDynamicXmlDocumentElementCollection : ConfigurationElementCollection, IEnumerable + internal class NotDynamicXmlDocumentElementCollection : ConfigurationElementCollection, IEnumerable { internal void Add(NotDynamicXmlDocumentElement element) { @@ -20,11 +20,11 @@ namespace Umbraco.Core.Configuration.UmbracoSettings return ((NotDynamicXmlDocumentElement) element).Value; } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { for (var i = 0; i < Count; i++) { - yield return BaseGet(i) as NotDynamicXmlDocumentElement; + yield return BaseGet(i) as INotDynamicXmlDocument; } } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/NotificationsElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/NotificationsElement.cs index 64a6fe4820..6ad66ed761 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/NotificationsElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/NotificationsElement.cs @@ -2,7 +2,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class NotificationsElement : ConfigurationElement + internal class NotificationsElement : ConfigurationElement, INotifications { [ConfigurationProperty("email")] internal InnerTextConfigurationElement EmailAddress @@ -21,5 +21,15 @@ namespace Umbraco.Core.Configuration.UmbracoSettings false); } } + + string INotifications.EmailAddress + { + get { return EmailAddress; } + } + + bool INotifications.DisableHtmlEmail + { + get { return DisableHtmlEmail; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ProvidersElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ProvidersElement.cs index 860c4fe4ab..86718c8520 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ProvidersElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ProvidersElement.cs @@ -2,12 +2,17 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class ProvidersElement : ConfigurationElement + internal class ProvidersElement : ConfigurationElement, IProviders { [ConfigurationProperty("users")] public UserProviderElement Users { get { return (UserProviderElement)base["users"]; } } + + IUserProvider IProviders.Users + { + get { return Users; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/RazorElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/RazorElement.cs index 55dfcb39d3..af7f258eb3 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/RazorElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/RazorElement.cs @@ -1,14 +1,15 @@ -using System.Configuration; +using System.Collections.Generic; +using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class RazorElement : ConfigurationElement + internal class RazorElement : ConfigurationElement, IRazor { private NotDynamicXmlDocumentElementCollection _defaultCollection; [ConfigurationCollection(typeof (NotDynamicXmlDocumentElementCollection), AddItemName = "element")] [ConfigurationProperty("notDynamicXmlDocumentElements", IsDefaultCollection = true)] - public NotDynamicXmlDocumentElementCollection NotDynamicXmlDocumentElements + internal NotDynamicXmlDocumentElementCollection NotDynamicXmlDocumentElements { get { @@ -40,9 +41,19 @@ namespace Umbraco.Core.Configuration.UmbracoSettings [ConfigurationCollection(typeof (RazorStaticMappingCollection), AddItemName = "mapping")] [ConfigurationProperty("dataTypeModelStaticMappings", IsDefaultCollection = true)] - public RazorStaticMappingCollection DataTypeModelStaticMappings + internal RazorStaticMappingCollection DataTypeModelStaticMappings { get { return (RazorStaticMappingCollection) base["dataTypeModelStaticMappings"]; } } + + IEnumerable IRazor.NotDynamicXmlDocumentElements + { + get { return NotDynamicXmlDocumentElements; } + } + + IEnumerable IRazor.DataTypeModelStaticMappings + { + get { return DataTypeModelStaticMappings; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/RazorStaticMappingCollection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/RazorStaticMappingCollection.cs index a87df83566..5be37f091b 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/RazorStaticMappingCollection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/RazorStaticMappingCollection.cs @@ -3,7 +3,7 @@ using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class RazorStaticMappingCollection : ConfigurationElementCollection, IEnumerable + internal class RazorStaticMappingCollection : ConfigurationElementCollection, IEnumerable { protected override ConfigurationElement CreateNewElement() { @@ -18,11 +18,11 @@ namespace Umbraco.Core.Configuration.UmbracoSettings } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { for (var i = 0; i < Count; i++) { - yield return BaseGet(i) as RazorStaticMappingElement; + yield return BaseGet(i) as IRazorStaticMapping; } } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/RazorStaticMappingElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/RazorStaticMappingElement.cs index 56302c677c..28c83e94f2 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/RazorStaticMappingElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/RazorStaticMappingElement.cs @@ -2,9 +2,9 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class RazorStaticMappingElement : InnerTextConfigurationElement - { - internal Guid DataTypeGuid + internal class RazorStaticMappingElement : InnerTextConfigurationElement, IRazorStaticMapping + { + public Guid DataTypeGuid { get { @@ -14,7 +14,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings } } - internal string NodeTypeAlias + public string NodeTypeAlias { get { @@ -24,7 +24,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings } } - internal string DocumentTypeAlias + public string DocumentTypeAlias { get { @@ -34,5 +34,9 @@ namespace Umbraco.Core.Configuration.UmbracoSettings } } + string IRazorStaticMapping.MappingName + { + get { return Value; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/RepositoriesCollection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/RepositoriesCollection.cs index de05be32d1..994c808703 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/RepositoriesCollection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/RepositoriesCollection.cs @@ -3,7 +3,7 @@ using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class RepositoriesCollection : ConfigurationElementCollection, IEnumerable + internal class RepositoriesCollection : ConfigurationElementCollection, IEnumerable { internal void Add(RepositoryElement item) { @@ -20,11 +20,11 @@ namespace Umbraco.Core.Configuration.UmbracoSettings return ((RepositoryElement)element).Id; } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { for (var i = 0; i < Count; i++) { - yield return BaseGet(i) as RepositoryElement; + yield return BaseGet(i) as IRepository; } } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/RepositoriesElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/RepositoriesElement.cs index 3144724cbf..3ad0a6bd6d 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/RepositoriesElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/RepositoriesElement.cs @@ -1,17 +1,23 @@ using System; +using System.Collections.Generic; using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class RepositoriesElement : ConfigurationElement + internal class RepositoriesElement : ConfigurationElement, IRepositories { [ConfigurationCollection(typeof(RepositoriesCollection), AddItemName = "repository")] [ConfigurationProperty("", IsDefaultCollection = true)] - public RepositoriesCollection Repositories + internal RepositoriesCollection Repositories { get { return (RepositoriesCollection) base[""]; } set { base[""] = value; } } + + IEnumerable IRepositories.Repositories + { + get { return Repositories; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/RepositoryElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/RepositoryElement.cs index deb8bc3ee8..d88b56add8 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/RepositoryElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/RepositoryElement.cs @@ -3,17 +3,17 @@ using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class RepositoryElement : ConfigurationElement + internal class RepositoryElement : ConfigurationElement, IRepository { [ConfigurationProperty("name")] - internal string Name + public string Name { get { return (string)base["name"]; } set { base["name"] = value; } } [ConfigurationProperty("guid")] - internal Guid Id + public Guid Id { get { return (Guid)base["guid"]; } set { base["guid"] = value; } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/RequestHandlerElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/RequestHandlerElement.cs index b2430079f7..22611ba7c2 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/RequestHandlerElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/RequestHandlerElement.cs @@ -5,10 +5,10 @@ using System.Collections.Generic; namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class RequestHandlerElement : ConfigurationElement + internal class RequestHandlerElement : ConfigurationElement, IRequestHandler { [ConfigurationProperty("useDomainPrefixes")] - internal InnerTextConfigurationElement UseDomainPrefixes + public InnerTextConfigurationElement UseDomainPrefixes { get { @@ -20,7 +20,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings } [ConfigurationProperty("addTrailingSlash")] - internal InnerTextConfigurationElement AddTrailingSlash + public InnerTextConfigurationElement AddTrailingSlash { get { @@ -33,7 +33,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings private UrlReplacingElement _defaultUrlReplacing; [ConfigurationProperty("urlReplacing")] - internal UrlReplacingElement UrlReplacing + public UrlReplacingElement UrlReplacing { get { @@ -100,5 +100,20 @@ namespace Umbraco.Core.Configuration.UmbracoSettings return (UrlReplacingElement)this["urlReplacing"]; } } + + bool IRequestHandler.UseDomainPrefixes + { + get { return UseDomainPrefixes; } + } + + bool IRequestHandler.AddTrailingSlash + { + get { return AddTrailingSlash; } + } + + IUrlReplacing IRequestHandler.UrlReplacing + { + get { return UrlReplacing; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ScheduledTaskElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ScheduledTaskElement.cs index 5da3de2b73..46b25ddaa2 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ScheduledTaskElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ScheduledTaskElement.cs @@ -2,28 +2,28 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class ScheduledTaskElement : ConfigurationElement + internal class ScheduledTaskElement : ConfigurationElement, IScheduledTask { [ConfigurationProperty("alias")] - internal string Alias + public string Alias { get { return (string)base["alias"]; } } [ConfigurationProperty("log")] - internal bool Log + public bool Log { get { return (bool)base["log"]; } } [ConfigurationProperty("interval")] - internal int Interval + public int Interval { get { return (int)base["interval"]; } } [ConfigurationProperty("url")] - internal string Url + public string Url { get { return (string)base["url"]; } } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ScheduledTasksCollection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ScheduledTasksCollection.cs index 5fdaaa6159..ce6fbd2cc6 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ScheduledTasksCollection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ScheduledTasksCollection.cs @@ -3,7 +3,7 @@ using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class ScheduledTasksCollection : ConfigurationElementCollection, IEnumerable + internal class ScheduledTasksCollection : ConfigurationElementCollection, IEnumerable { protected override ConfigurationElement CreateNewElement() { @@ -15,11 +15,11 @@ namespace Umbraco.Core.Configuration.UmbracoSettings return ((ScheduledTaskElement)element).Alias; } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { for (var i = 0; i < Count; i++) { - yield return BaseGet(i) as ScheduledTaskElement; + yield return BaseGet(i) as IScheduledTask; } } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ScheduledTasksElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ScheduledTasksElement.cs index 781fee0222..91b304c657 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ScheduledTasksElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ScheduledTasksElement.cs @@ -1,14 +1,20 @@ -using System.Configuration; +using System.Collections.Generic; +using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class ScheduledTasksElement : ConfigurationElement + internal class ScheduledTasksElement : ConfigurationElement, IScheduledTasks { [ConfigurationCollection(typeof(ScheduledTasksCollection), AddItemName = "task")] [ConfigurationProperty("", IsDefaultCollection = true)] - public ScheduledTasksCollection Tasks + internal ScheduledTasksCollection Tasks { get { return (ScheduledTasksCollection)base[""]; } } + + IEnumerable IScheduledTasks.Tasks + { + get { return Tasks; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ScriptingElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ScriptingElement.cs index 86357e6fb4..0b51f1e810 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ScriptingElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ScriptingElement.cs @@ -2,13 +2,18 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class ScriptingElement : ConfigurationElement + internal class ScriptingElement : ConfigurationElement, IScripting { [ConfigurationProperty("razor")] - public RazorElement Razor + internal RazorElement Razor { get { return (RazorElement) base["razor"]; } } + + IRazor IScripting.Razor + { + get { return Razor; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/SecurityElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/SecurityElement.cs index 752f2ff6c9..e493e74e71 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/SecurityElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/SecurityElement.cs @@ -2,7 +2,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class SecurityElement : ConfigurationElement + internal class SecurityElement : ConfigurationElement, ISecurity { [ConfigurationProperty("keepUserLoggedIn")] internal InnerTextConfigurationElement KeepUserLoggedIn @@ -51,5 +51,25 @@ namespace Umbraco.Core.Configuration.UmbracoSettings null); } } + + bool ISecurity.KeepUserLoggedIn + { + get { return KeepUserLoggedIn; } + } + + bool ISecurity.HideDisabledUsersInBackoffice + { + get { return HideDisabledUsersInBackoffice; } + } + + string ISecurity.AuthCookieName + { + get { return AuthCookieName; } + } + + string ISecurity.AuthCookieDomain + { + get { return AuthCookieDomain; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ServerCollection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ServerCollection.cs index a1d098eac9..9381170d56 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ServerCollection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ServerCollection.cs @@ -3,7 +3,7 @@ using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class ServerCollection : ConfigurationElementCollection, IEnumerable + internal class ServerCollection : ConfigurationElementCollection, IEnumerable { protected override ConfigurationElement CreateNewElement() { @@ -15,11 +15,11 @@ namespace Umbraco.Core.Configuration.UmbracoSettings return ((ServerElement)element).Value; } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { for (var i = 0; i < Count; i++) { - yield return BaseGet(i) as ServerElement; + yield return BaseGet(i) as IServerElement; } } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ServerElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ServerElement.cs index 4fa87a4aea..8568c0f787 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ServerElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ServerElement.cs @@ -1,8 +1,8 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class ServerElement : InnerTextConfigurationElement + internal class ServerElement : InnerTextConfigurationElement, IServerElement { - internal string ForcePortnumber + public string ForcePortnumber { get { @@ -12,7 +12,7 @@ } } - internal string ForceProtocol + public string ForceProtocol { get { @@ -20,6 +20,11 @@ ? null : RawXml.Attribute("forceProtocol").Value; } + } + + string IServerElement.ServerAddress + { + get { return Value; } } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/TemplatesElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/TemplatesElement.cs index ff526c51d6..b864d0ed2e 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/TemplatesElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/TemplatesElement.cs @@ -2,7 +2,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class TemplatesElement : ConfigurationElement + internal class TemplatesElement : ConfigurationElement, ITemplates { [ConfigurationProperty("useAspNetMasterPages")] internal InnerTextConfigurationElement UseAspNetMasterPages @@ -51,5 +51,25 @@ namespace Umbraco.Core.Configuration.UmbracoSettings false); } } + + bool ITemplates.UseAspNetMasterPages + { + get { return UseAspNetMasterPages; } + } + + bool ITemplates.EnableSkinSupport + { + get { return EnableSkinSupport; } + } + + RenderingEngine ITemplates.DefaultRenderingEngine + { + get { return DefaultRenderingEngine; } + } + + bool ITemplates.EnableTemplateFolders + { + get { return EnableTemplateFolders; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/UmbracoSettingsSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/UmbracoSettingsSection.cs index a8852b267e..b1a35e97b7 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/UmbracoSettingsSection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/UmbracoSettingsSection.cs @@ -3,7 +3,38 @@ using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { - public class UmbracoSettingsSection : ConfigurationSection + public interface IUmbracoSettings + { + IContent Content { get; } + + ISecurity Security { get; } + + IRequestHandler RequestHandler { get; } + + ITemplates Templates { get; } + + IDeveloper Developer { get; } + + IViewstateMoverModule ViewstateMoverModule { get; } + + ILogging Logging { get; } + + IScheduledTasks ScheduledTasks { get; } + + IDistributedCall DistributedCall { get; } + + IRepositories PackageRepositories { get; } + + IProviders Providers { get; } + + IHelp Help { get; } + + IWebRouting WebRouting { get; } + + IScripting Scripting { get; } + } + + public class UmbracoSettingsSection : ConfigurationSection, IUmbracoSettings { ///// @@ -128,26 +159,75 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { get { return (ScriptingElement)this["scripting"]; } } + + IContent IUmbracoSettings.Content + { + get { return Content; } + } - ///// - ///// This ensures that any element that is not defined will get replaced with a Null value - ///// - ///// - ///// This is a work around because setting defaultValue on the attribute to null doesn't work. - ///// - //protected override void PostDeserialize() - //{ - // //ensure externalLogger is null when it is not defined - // var loggingProperty = Properties["logging"]; - // var logging = this[loggingProperty] as ConfigurationElement; - // if (logging != null && logging.ElementInformation.IsPresent == false) - // { - // this[loggingProperty] = new ; - // } + ISecurity IUmbracoSettings.Security + { + get { return Security; } + } + IRequestHandler IUmbracoSettings.RequestHandler + { + get { return RequestHandler; } + } - // base.PostDeserialize(); - //} + ITemplates IUmbracoSettings.Templates + { + get { return Templates; } + } + IDeveloper IUmbracoSettings.Developer + { + get { return Developer; } + } + + IViewstateMoverModule IUmbracoSettings.ViewstateMoverModule + { + get { return ViewstateMoverModule; } + } + + ILogging IUmbracoSettings.Logging + { + get { return Logging; } + } + + IScheduledTasks IUmbracoSettings.ScheduledTasks + { + get { return ScheduledTasks; } + } + + IDistributedCall IUmbracoSettings.DistributedCall + { + get { return DistributedCall; } + } + + IRepositories IUmbracoSettings.PackageRepositories + { + get { return PackageRepositories; } + } + + IProviders IUmbracoSettings.Providers + { + get { return Providers; } + } + + IHelp IUmbracoSettings.Help + { + get { return Help; } + } + + IWebRouting IUmbracoSettings.WebRouting + { + get { return WebRouting; } + } + + IScripting IUmbracoSettings.Scripting + { + get { return Scripting; } + } } } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/UrlReplacingElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/UrlReplacingElement.cs index c780f6f082..597e15f156 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/UrlReplacingElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/UrlReplacingElement.cs @@ -1,8 +1,9 @@ -using System.Configuration; +using System.Collections.Generic; +using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class UrlReplacingElement : ConfigurationElement + internal class UrlReplacingElement : ConfigurationElement, IUrlReplacing { [ConfigurationProperty("removeDoubleDashes", DefaultValue = true)] internal bool RemoveDoubleDashes @@ -12,11 +13,21 @@ namespace Umbraco.Core.Configuration.UmbracoSettings [ConfigurationCollection(typeof(CharCollection), AddItemName = "char")] [ConfigurationProperty("", IsDefaultCollection = true)] - public CharCollection CharCollection + internal CharCollection CharCollection { get { return (CharCollection)base[""]; } set { base[""] = value; } } + + bool IUrlReplacing.RemoveDoubleDashes + { + get { return RemoveDoubleDashes; } + } + + IEnumerable IUrlReplacing.CharCollection + { + get { return CharCollection; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/UserProviderElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/UserProviderElement.cs index ce830fba4a..fbff598d79 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/UserProviderElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/UserProviderElement.cs @@ -2,7 +2,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class UserProviderElement : ConfigurationElement + internal class UserProviderElement : ConfigurationElement, IUserProvider { [ConfigurationProperty("DefaultBackofficeProvider")] internal InnerTextConfigurationElement DefaultBackOfficeProvider @@ -15,5 +15,10 @@ namespace Umbraco.Core.Configuration.UmbracoSettings "UsersMembershipProvider"); } } + + string IUserProvider.DefaultBackOfficeProvider + { + get { return DefaultBackOfficeProvider; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ViewstateMoverModuleElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ViewstateMoverModuleElement.cs index 53b55e1a19..c6d6a96a37 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ViewstateMoverModuleElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ViewstateMoverModuleElement.cs @@ -2,10 +2,10 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class ViewstateMoverModuleElement : ConfigurationElement + internal class ViewstateMoverModuleElement : ConfigurationElement, IViewstateMoverModule { [ConfigurationProperty("enable", DefaultValue = false)] - internal bool Enable + public bool Enable { get { return (bool)base["enable"]; } } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/WebRoutingElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/WebRoutingElement.cs index 193b70d099..a66f151a9a 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/WebRoutingElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/WebRoutingElement.cs @@ -2,7 +2,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { - internal class WebRoutingElement : ConfigurationElement + internal class WebRoutingElement : ConfigurationElement, IWebRouting { [ConfigurationProperty("trySkipIisCustomErrors", DefaultValue = "false")] public bool TrySkipIisCustomErrors diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 4e60ca7b7e..8a7bce6897 100644 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -171,7 +171,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentErrorsElementDefaultTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentErrorsElementDefaultTests.cs index 3c150f4f0f..b94bfda440 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentErrorsElementDefaultTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentErrorsElementDefaultTests.cs @@ -14,9 +14,9 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings [Test] public override void Can_Set_Multiple() { - Assert.IsTrue(Section.Content.Errors.Error404Collection.Count == 1); + Assert.IsTrue(Section.Content.Errors.Error404Collection.Count() == 1); Assert.IsTrue(Section.Content.Errors.Error404Collection.ElementAt(0).Culture == null); - Assert.IsTrue(Section.Content.Errors.Error404Collection.ElementAt(0).Value == 1); + Assert.IsTrue(Section.Content.Errors.Error404Collection.ElementAt(0).ContentId == 1); } } } \ No newline at end of file diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentErrorsElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentErrorsElementTests.cs index 724d59086a..84a68ec184 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentErrorsElementTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentErrorsElementTests.cs @@ -9,13 +9,13 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings [Test] public virtual void Can_Set_Multiple() { - Assert.IsTrue(Section.Content.Errors.Error404Collection.Count == 3); + Assert.IsTrue(Section.Content.Errors.Error404Collection.Count() == 3); Assert.IsTrue(Section.Content.Errors.Error404Collection.ElementAt(0).Culture == "default"); - Assert.IsTrue(Section.Content.Errors.Error404Collection.ElementAt(0).Value == 1047); + Assert.IsTrue(Section.Content.Errors.Error404Collection.ElementAt(0).ContentId == 1047); Assert.IsTrue(Section.Content.Errors.Error404Collection.ElementAt(1).Culture == "en-US"); - Assert.IsTrue(Section.Content.Errors.Error404Collection.ElementAt(1).Value == 1048); + Assert.IsTrue(Section.Content.Errors.Error404Collection.ElementAt(1).ContentId == 1048); Assert.IsTrue(Section.Content.Errors.Error404Collection.ElementAt(2).Culture == "en-UK"); - Assert.IsTrue(Section.Content.Errors.Error404Collection.ElementAt(2).Value == 1049); + Assert.IsTrue(Section.Content.Errors.Error404Collection.ElementAt(2).ContentId == 1049); } } } \ No newline at end of file diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentImagingElementDefaultTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentImagingElementDefaultTests.cs index 9048a4af8e..9fefcb8ce7 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentImagingElementDefaultTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentImagingElementDefaultTests.cs @@ -14,7 +14,7 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings [Test] public override void ImageAutoFillProperties() { - Assert.IsTrue(Section.Content.Imaging.ImageAutoFillProperties.Count == 1); + Assert.IsTrue(Section.Content.Imaging.ImageAutoFillProperties.Count() == 1); Assert.IsTrue(Section.Content.Imaging.ImageAutoFillProperties.ElementAt(0).Alias == "umbracoFile"); Assert.IsTrue(Section.Content.Imaging.ImageAutoFillProperties.ElementAt(0).WidthFieldAlias == "umbracoWidth"); Assert.IsTrue(Section.Content.Imaging.ImageAutoFillProperties.ElementAt(0).HeightFieldAlias == "umbracoHeight"); diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentImagingElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentImagingElementTests.cs index f7193a40bd..3357a9d37d 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentImagingElementTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentImagingElementTests.cs @@ -19,7 +19,7 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings [Test] public virtual void ImageAutoFillProperties() { - Assert.IsTrue(Section.Content.Imaging.ImageAutoFillProperties.Count == 2); + Assert.IsTrue(Section.Content.Imaging.ImageAutoFillProperties.Count() == 2); Assert.IsTrue(Section.Content.Imaging.ImageAutoFillProperties.ElementAt(0).Alias == "umbracoFile"); Assert.IsTrue(Section.Content.Imaging.ImageAutoFillProperties.ElementAt(0).WidthFieldAlias == "umbracoWidth"); Assert.IsTrue(Section.Content.Imaging.ImageAutoFillProperties.ElementAt(0).HeightFieldAlias == "umbracoHeight"); diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentScriptEditorElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentScriptEditorElementTests.cs index 55ed40bf0f..626bbac766 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentScriptEditorElementTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/ContentScriptEditorElementTests.cs @@ -9,7 +9,7 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings [Test] public void ScriptFolderPath() { - Assert.IsTrue(Section.Content.ScriptEditor.ScriptFolderPath.Value == "/scripts"); + Assert.IsTrue(Section.Content.ScriptEditor.ScriptFolderPath == "/scripts"); } [Test] public void ScriptFileTypes() @@ -19,7 +19,7 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings [Test] public void DisableScriptEditor() { - Assert.IsTrue(Section.Content.ScriptEditor.DisableScriptEditor.Value == false); + Assert.IsTrue(Section.Content.ScriptEditor.DisableScriptEditor == false); } } } \ No newline at end of file diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/DeveloperElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/DeveloperElementTests.cs index ee2b50957f..b21e5241de 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/DeveloperElementTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/DeveloperElementTests.cs @@ -9,9 +9,9 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings [Test] public void AppCodeFileExtensions() { - Assert.IsTrue(Section.Developer.AppCodeFileExtensions.AppCodeFileExtensionsCollection.Count == 2); - Assert.IsTrue(Section.Developer.AppCodeFileExtensions.AppCodeFileExtensionsCollection.All( - x => "cs,vb".Split(',').Contains(x.Value))); + Assert.IsTrue(Section.Developer.AppCodeFileExtensions.AppCodeFileExtensions.Count() == 2); + Assert.IsTrue(Section.Developer.AppCodeFileExtensions.AppCodeFileExtensions.All( + x => "cs,vb".Split(',').Contains(x.Extension))); } } } \ No newline at end of file diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/DistributedCallElementDefaultTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/DistributedCallElementDefaultTests.cs index adc0426062..90b32fdbd5 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/DistributedCallElementDefaultTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/DistributedCallElementDefaultTests.cs @@ -1,4 +1,5 @@ -using NUnit.Framework; +using System.Linq; +using NUnit.Framework; namespace Umbraco.Tests.Configurations.UmbracoSettings { @@ -20,7 +21,7 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings [Test] public override void Servers() { - Assert.IsTrue(Section.DistributedCall.Servers.Count == 0); + Assert.IsTrue(Section.DistributedCall.Servers.Count() == 0); } } } \ No newline at end of file diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/DistributedCallElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/DistributedCallElementTests.cs index 3a0291a24d..c49010e121 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/DistributedCallElementTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/DistributedCallElementTests.cs @@ -21,9 +21,9 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings [Test] public virtual void Servers() { - Assert.IsTrue(Section.DistributedCall.Servers.Count == 2); - Assert.IsTrue(Section.DistributedCall.Servers.ElementAt(0).Value == "127.0.0.1"); - Assert.IsTrue(Section.DistributedCall.Servers.ElementAt(1).Value == "127.0.0.2"); + Assert.IsTrue(Section.DistributedCall.Servers.Count() == 2); + Assert.IsTrue(Section.DistributedCall.Servers.ElementAt(0).ServerAddress == "127.0.0.1"); + Assert.IsTrue(Section.DistributedCall.Servers.ElementAt(1).ServerAddress == "127.0.0.2"); Assert.IsTrue(Section.DistributedCall.Servers.ElementAt(1).ForceProtocol == "https"); Assert.IsTrue(Section.DistributedCall.Servers.ElementAt(1).ForcePortnumber == "443"); } diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/HelpElementDefaultTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/HelpElementDefaultTests.cs index 9c58b2d204..558f5edd58 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/HelpElementDefaultTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/HelpElementDefaultTests.cs @@ -1,4 +1,5 @@ -using NUnit.Framework; +using System.Linq; +using NUnit.Framework; namespace Umbraco.Tests.Configurations.UmbracoSettings { @@ -13,7 +14,7 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings [Test] public override void Links() { - Assert.IsTrue(Section.Help.Links.Count == 0); + Assert.IsTrue(Section.Help.Links.Count() == 0); } } } \ No newline at end of file diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/HelpElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/HelpElementTests.cs index db17d76cdc..48a0166f42 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/HelpElementTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/HelpElementTests.cs @@ -15,7 +15,7 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings [Test] public virtual void Links() { - Assert.IsTrue(Section.Help.Links.Count == 2); + Assert.IsTrue(Section.Help.Links.Count() == 2); Assert.IsTrue(Section.Help.Links.ElementAt(0).Application == "content"); Assert.IsTrue(Section.Help.Links.ElementAt(0).ApplicationUrl == "dashboard.aspx"); Assert.IsTrue(Section.Help.Links.ElementAt(0).Language == "en"); diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/LoggingElementDefaultTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/LoggingElementDefaultTests.cs index 51f7e710f1..a1ab3bedb1 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/LoggingElementDefaultTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/LoggingElementDefaultTests.cs @@ -1,4 +1,5 @@ -using NUnit.Framework; +using System.Linq; +using NUnit.Framework; namespace Umbraco.Tests.Configurations.UmbracoSettings { @@ -33,7 +34,7 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings [Test] public override void DisabledLogTypes() { - Assert.IsTrue(Section.Logging.DisabledLogTypes.Count == 0); + Assert.IsTrue(Section.Logging.DisabledLogTypes.Count() == 0); } [Test] public override void CleaningMiliseconds() diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/LoggingElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/LoggingElementTests.cs index 8d86dd8665..fbb775d5b8 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/LoggingElementTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/LoggingElementTests.cs @@ -25,9 +25,9 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings [Test] public virtual void DisabledLogTypes() { - Assert.IsTrue(Section.Logging.DisabledLogTypes.Count == 2); - Assert.IsTrue(Section.Logging.DisabledLogTypes.ElementAt(0) == "[alias-of-log-type-in-lowercase]"); - Assert.IsTrue(Section.Logging.DisabledLogTypes.ElementAt(1) == "anotherlogalias"); + Assert.IsTrue(Section.Logging.DisabledLogTypes.Count() == 2); + Assert.IsTrue(Section.Logging.DisabledLogTypes.ElementAt(0).LogTypeAlias == "[alias-of-log-type-in-lowercase]"); + Assert.IsTrue(Section.Logging.DisabledLogTypes.ElementAt(1).LogTypeAlias == "anotherlogalias"); } [Test] public virtual void ExternalLogger_Assembly() diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/PackageRepositoriesElementDefaultTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/PackageRepositoriesElementDefaultTests.cs new file mode 100644 index 0000000000..fad8b25cb2 --- /dev/null +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/PackageRepositoriesElementDefaultTests.cs @@ -0,0 +1,23 @@ +using System; +using System.Linq; +using NUnit.Framework; + +namespace Umbraco.Tests.Configurations.UmbracoSettings +{ + [TestFixture] + public class PackageRepositoriesElementDefaultTests : PackageRepositoriesElementTests + { + protected override bool TestingDefaults + { + get { return true; } + } + + [Test] + public override void Repositories() + { + Assert.IsTrue(Section.PackageRepositories.Repositories.Count() == 1); + Assert.IsTrue(Section.PackageRepositories.Repositories.ElementAt(0).Id == Guid.Parse("65194810-1f85-11dd-bd0b-0800200c9a66")); + Assert.IsTrue(Section.PackageRepositories.Repositories.ElementAt(0).Name == "Umbraco package Repository"); + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/PackageRepositoriesElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/PackageRepositoriesElementTests.cs index cc9df2f16e..55d528fa38 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/PackageRepositoriesElementTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/PackageRepositoriesElementTests.cs @@ -10,28 +10,11 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings [Test] public virtual void Repositories() { - Assert.IsTrue(Section.PackageRepositories.Repositories.Count == 2); + Assert.IsTrue(Section.PackageRepositories.Repositories.Count() == 2); Assert.IsTrue(Section.PackageRepositories.Repositories.ElementAt(0).Id == Guid.Parse("65194810-1f85-11dd-bd0b-0800200c9a66")); Assert.IsTrue(Section.PackageRepositories.Repositories.ElementAt(0).Name == "Umbraco package Repository"); Assert.IsTrue(Section.PackageRepositories.Repositories.ElementAt(1).Id == Guid.Parse("163245E0-CD22-44B6-841A-1B9B9D2E955F")); Assert.IsTrue(Section.PackageRepositories.Repositories.ElementAt(1).Name == "Test Repo"); } } - - [TestFixture] - public class PackageRepositoriesElementDefaultTests : PackageRepositoriesElementTests - { - protected override bool TestingDefaults - { - get { return true; } - } - - [Test] - public override void Repositories() - { - Assert.IsTrue(Section.PackageRepositories.Repositories.Count == 1); - Assert.IsTrue(Section.PackageRepositories.Repositories.ElementAt(0).Id == Guid.Parse("65194810-1f85-11dd-bd0b-0800200c9a66")); - Assert.IsTrue(Section.PackageRepositories.Repositories.ElementAt(0).Name == "Umbraco package Repository"); - } - } } \ No newline at end of file diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/RequestHandlerElementDefaultTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/RequestHandlerElementDefaultTests.cs new file mode 100644 index 0000000000..b05846ccea --- /dev/null +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/RequestHandlerElementDefaultTests.cs @@ -0,0 +1,13 @@ +using NUnit.Framework; + +namespace Umbraco.Tests.Configurations.UmbracoSettings +{ + [TestFixture] + public class RequestHandlerElementDefaultTests : RequestHandlerElementTests + { + protected override bool TestingDefaults + { + get { return true; } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/RequestHandlerElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/RequestHandlerElementTests.cs index 8ccb893e38..ad9b6e1a40 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/RequestHandlerElementTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/RequestHandlerElementTests.cs @@ -29,7 +29,7 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings { var chars = @" ,"",',%,.,;,/,\,:,#,+,*,&,?,æ,ø,å,ä,ö,ü,ß,Ä,Ö,|,<,>"; var items = chars.Split(','); - Assert.AreEqual(items.Length, Section.RequestHandler.UrlReplacing.CharCollection.Count); + Assert.AreEqual(items.Length, Section.RequestHandler.UrlReplacing.CharCollection.Count()); Assert.IsTrue(Section.RequestHandler.UrlReplacing.CharCollection .All(x => items.Contains(x.Char))); @@ -41,13 +41,4 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings } } - - [TestFixture] - public class RequestHandlerElementDefaultTests : RequestHandlerElementTests - { - protected override bool TestingDefaults - { - get { return true; } - } - } } \ No newline at end of file diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/ScheduledTasksElementDefaultTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/ScheduledTasksElementDefaultTests.cs index 8a1072a81d..a6259d9fda 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/ScheduledTasksElementDefaultTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/ScheduledTasksElementDefaultTests.cs @@ -1,4 +1,5 @@ -using NUnit.Framework; +using System.Linq; +using NUnit.Framework; namespace Umbraco.Tests.Configurations.UmbracoSettings { @@ -13,7 +14,7 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings [Test] public override void Tasks() { - Assert.IsTrue(Section.ScheduledTasks.Tasks.Count == 0); + Assert.IsTrue(Section.ScheduledTasks.Tasks.Count() == 0); } } } \ No newline at end of file diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/ScheduledTasksElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/ScheduledTasksElementTests.cs index 726b9849f5..4c66d26519 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/ScheduledTasksElementTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/ScheduledTasksElementTests.cs @@ -9,7 +9,7 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings [Test] public virtual void Tasks() { - Assert.IsTrue(Section.ScheduledTasks.Tasks.Count == 2); + Assert.IsTrue(Section.ScheduledTasks.Tasks.Count() == 2); Assert.IsTrue(Section.ScheduledTasks.Tasks.ElementAt(0).Alias == "test60"); Assert.IsTrue(Section.ScheduledTasks.Tasks.ElementAt(0).Log == true); Assert.IsTrue(Section.ScheduledTasks.Tasks.ElementAt(0).Interval == 60); diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/ScriptingElementDefaultTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/ScriptingElementDefaultTests.cs new file mode 100644 index 0000000000..e5407a8859 --- /dev/null +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/ScriptingElementDefaultTests.cs @@ -0,0 +1,21 @@ +using System.Linq; +using NUnit.Framework; + +namespace Umbraco.Tests.Configurations.UmbracoSettings +{ + [TestFixture] + public class ScriptingElementDefaultTests : ScriptingElementTests + { + protected override bool TestingDefaults + { + get { return true; } + } + + [Test] + public override void DataTypeModelStaticMappings() + { + Assert.AreEqual(0, Section.Scripting.Razor.DataTypeModelStaticMappings.Count()); + } + + } +} \ No newline at end of file diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/ScriptingElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/ScriptingElementTests.cs index 41524d90e6..acf42e9620 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/ScriptingElementTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/ScriptingElementTests.cs @@ -4,22 +4,6 @@ using NUnit.Framework; namespace Umbraco.Tests.Configurations.UmbracoSettings { - [TestFixture] - public class ScriptingElementDefaultTests : ScriptingElementTests - { - protected override bool TestingDefaults - { - get { return true; } - } - - [Test] - public override void DataTypeModelStaticMappings() - { - Assert.AreEqual(0, Section.Scripting.Razor.DataTypeModelStaticMappings.Count); - } - - } - [TestFixture] public class ScriptingElementTests : UmbracoSettingsTests { @@ -27,7 +11,7 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings public void NotDynamicXmlDocumentElements() { Assert.IsTrue(Section.Scripting.Razor.NotDynamicXmlDocumentElements - .All(x => "p,div,ul,span".Split(',').Contains(x.Value))); + .All(x => "p,div,ul,span".Split(',').Contains(x.Element))); } [Test] @@ -35,27 +19,27 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings { var mappings = Section.Scripting.Razor.DataTypeModelStaticMappings.ToArray(); Assert.IsTrue(mappings[0].DataTypeGuid == Guid.Parse("A3DB4034-BCB0-4E69-B3EE-DD4E6ECA74C2")); - Assert.IsTrue(mappings[0] == "MyName.1"); + Assert.IsTrue(mappings[0].MappingName == "MyName.1"); Assert.IsTrue(mappings[1].DocumentTypeAlias == "textPage2"); Assert.IsTrue(mappings[1].NodeTypeAlias == "propertyAlias2"); - Assert.IsTrue(mappings[1] == "MyName.2"); + Assert.IsTrue(mappings[1].MappingName == "MyName.2"); Assert.IsTrue(mappings[2].DataTypeGuid == Guid.Parse("BD14E709-45BE-431C-B228-6255CDEDFCD5")); Assert.IsTrue(mappings[2].DocumentTypeAlias == "textPage3"); Assert.IsTrue(mappings[2].NodeTypeAlias == "propertyAlias3"); - Assert.IsTrue(mappings[2] == "MyName.3"); + Assert.IsTrue(mappings[2].MappingName == "MyName.3"); Assert.IsTrue(mappings[3].DataTypeGuid == Guid.Parse("FCE8187E-0366-4833-953A-E5ECA11AA23A")); Assert.IsTrue(mappings[3].DocumentTypeAlias == "textPage4"); - Assert.IsTrue(mappings[3] == "MyName.4"); + Assert.IsTrue(mappings[3].MappingName == "MyName.4"); Assert.IsTrue(mappings[4].DataTypeGuid == Guid.Parse("9139315A-6681-4C45-B89F-BE48D30F9AB9")); Assert.IsTrue(mappings[4].NodeTypeAlias == "propertyAlias5"); - Assert.IsTrue(mappings[4] == "MyName.5"); + Assert.IsTrue(mappings[4].MappingName == "MyName.5"); Assert.IsTrue(mappings[5].NodeTypeAlias == "propertyAlias6"); - Assert.IsTrue(mappings[5] == "MyName.6"); + Assert.IsTrue(mappings[5].MappingName == "MyName.6"); } } } \ No newline at end of file diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/SecurityElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/SecurityElementTests.cs index d4cd9b3911..55a2981842 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/SecurityElementTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/SecurityElementTests.cs @@ -18,12 +18,12 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings [Test] public void AuthCookieDomain() { - Assert.IsTrue(Section.Security.AuthCookieDomain.Value == null); + Assert.IsTrue(Section.Security.AuthCookieDomain == null); } [Test] public void AuthCookieName() { - Assert.IsTrue(Section.Security.AuthCookieName.Value == "UMB_UCONTEXT"); + Assert.IsTrue(Section.Security.AuthCookieName == "UMB_UCONTEXT"); } } } \ No newline at end of file diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/UmbracoSettingsTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/UmbracoSettingsTests.cs index e1076293a5..8a651569c3 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/UmbracoSettingsTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/UmbracoSettingsTests.cs @@ -36,6 +36,6 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings Assert.IsNotNull(Section); } - protected UmbracoSettingsSection Section { get; private set; } + protected IUmbracoSettings Section { get; private set; } } } \ No newline at end of file diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/WebRoutingElementDefaultTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/WebRoutingElementDefaultTests.cs new file mode 100644 index 0000000000..ef0596c18d --- /dev/null +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/WebRoutingElementDefaultTests.cs @@ -0,0 +1,15 @@ +using NUnit.Framework; + +namespace Umbraco.Tests.Configurations.UmbracoSettings +{ + [TestFixture] + public class WebRoutingElementDefaultTests : WebRoutingElementTests + { + + protected override bool TestingDefaults + { + get { return true; } + } + + } +} \ No newline at end of file diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/WebRoutingElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/WebRoutingElementTests.cs index ffb5a3bc09..feb308ac31 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/WebRoutingElementTests.cs +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/WebRoutingElementTests.cs @@ -17,15 +17,4 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings Assert.IsTrue(Section.WebRouting.TrySkipIisCustomErrors == false); } } - - [TestFixture] - public class WebRoutingElementDefaultTests : WebRoutingElementTests - { - - protected override bool TestingDefaults - { - get { return true; } - } - - } } \ No newline at end of file diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj index fed2d5c172..3c9c6b747e 100644 --- a/src/Umbraco.Tests/Umbraco.Tests.csproj +++ b/src/Umbraco.Tests/Umbraco.Tests.csproj @@ -221,12 +221,15 @@ + + + @@ -235,6 +238,7 @@ +