diff --git a/src/Umbraco.Core/Configuration/ConfigConnectionString.cs b/src/Umbraco.Core/Configuration/ConfigConnectionString.cs
index 3a540aa3e2..72408e212c 100644
--- a/src/Umbraco.Core/Configuration/ConfigConnectionString.cs
+++ b/src/Umbraco.Core/Configuration/ConfigConnectionString.cs
@@ -29,7 +29,9 @@ namespace Umbraco.Core.Configuration
ConnectionString = connectionString
};
- if (builder.TryGetValue("Data Source", out var ds) && ds is string dataSource)
+ if (
+ (builder.TryGetValue("Data Source", out var ds)
+ || builder.TryGetValue("DataSource", out ds)) && ds is string dataSource)
{
if (dataSource.EndsWith(".sdf"))
{
@@ -37,6 +39,7 @@ namespace Umbraco.Core.Configuration
}
}
+
if (builder.TryGetValue("Server", out var s) && s is string server && !string.IsNullOrEmpty(server))
{
if (builder.TryGetValue("Database", out var db) && db is string database && !string.IsNullOrEmpty(database))
diff --git a/src/Umbraco.Core/Configuration/ContentSettingsExtensions.cs b/src/Umbraco.Core/Configuration/ContentSettingsExtensions.cs
index 21ebe55f2f..7bf8f0fa15 100644
--- a/src/Umbraco.Core/Configuration/ContentSettingsExtensions.cs
+++ b/src/Umbraco.Core/Configuration/ContentSettingsExtensions.cs
@@ -39,7 +39,7 @@ namespace Umbraco.Core.Configuration
///
/// The property type alias.
/// The auto-fill configuration for the specified property alias, or null.
- public static IImagingAutoFillUploadField GetConfig(this ContentSettings contentSettings, string propertyTypeAlias)
+ public static ImagingAutoFillUploadField GetConfig(this ContentSettings contentSettings, string propertyTypeAlias)
{
var autoFillConfigs = contentSettings.Imaging.AutoFillImageProperties;
return autoFillConfigs?.FirstOrDefault(x => x.Alias == propertyTypeAlias);
diff --git a/src/Umbraco.Core/Configuration/Models/ContentErrorPage.cs b/src/Umbraco.Core/Configuration/Models/ContentErrorPage.cs
index 8971dda5cc..6a362c93a3 100644
--- a/src/Umbraco.Core/Configuration/Models/ContentErrorPage.cs
+++ b/src/Umbraco.Core/Configuration/Models/ContentErrorPage.cs
@@ -1,15 +1,30 @@
using System;
+using System.ComponentModel.DataAnnotations;
+using Umbraco.Core.Configuration.Models.Validation;
namespace Umbraco.Core.Configuration.Models
{
- public class ContentErrorPage
+ public class ContentErrorPage : ValidatableEntryBase
{
- //TODO introduce validation, to check only one of key/id/xPath is used.
- public int ContentId { get; }
- public Guid ContentKey { get; }
- public string ContentXPath { get; }
- public bool HasContentId { get; }
- public bool HasContentKey { get; }
+ public int ContentId { get; set; }
+
+ public Guid ContentKey { get; set; }
+
+ public string ContentXPath { get; set; }
+
+ public bool HasContentId => ContentId != 0;
+
+ public bool HasContentKey => ContentKey != Guid.Empty;
+
+ public bool HasContentXPath => !string.IsNullOrEmpty(ContentXPath);
+
+ [Required]
public string Culture { get; set; }
+
+ internal override bool IsValid()
+ {
+ return base.IsValid() &&
+ ((HasContentId ? 1 : 0) + (HasContentKey ? 1 : 0) + (HasContentXPath ? 1 : 0) == 1);
+ }
}
}
diff --git a/src/Umbraco.Core/Configuration/Models/ContentImagingSettings.cs b/src/Umbraco.Core/Configuration/Models/ContentImagingSettings.cs
index 018936896c..7c1e570426 100644
--- a/src/Umbraco.Core/Configuration/Models/ContentImagingSettings.cs
+++ b/src/Umbraco.Core/Configuration/Models/ContentImagingSettings.cs
@@ -1,7 +1,4 @@
-using System.Collections.Generic;
-using Umbraco.Core.Configuration.UmbracoSettings;
-
-namespace Umbraco.Core.Configuration.Models
+namespace Umbraco.Core.Configuration.Models
{
public class ContentImagingSettings
{
@@ -17,17 +14,8 @@ namespace Umbraco.Core.Configuration.Models
}
};
- public IEnumerable ImageFileTypes { get; set; } = new[] { "jpeg", "jpg", "gif", "bmp", "png", "tiff", "tif" };
+ public string[] ImageFileTypes { get; set; } = new[] { "jpeg", "jpg", "gif", "bmp", "png", "tiff", "tif" };
- public IEnumerable AutoFillImageProperties { get; set; } = DefaultImagingAutoFillUploadField;
-
- private class ImagingAutoFillUploadField : IImagingAutoFillUploadField
- {
- public string Alias { get; set; }
- public string WidthFieldAlias { get; set; }
- public string HeightFieldAlias { get; set; }
- public string LengthFieldAlias { get; set; }
- public string ExtensionFieldAlias { get; set; }
- }
+ public ImagingAutoFillUploadField[] AutoFillImageProperties { get; set; } = DefaultImagingAutoFillUploadField;
}
}
diff --git a/src/Umbraco.Core/Configuration/Models/ContentSettings.cs b/src/Umbraco.Core/Configuration/Models/ContentSettings.cs
index 5158a5c746..65d7855dc7 100644
--- a/src/Umbraco.Core/Configuration/Models/ContentSettings.cs
+++ b/src/Umbraco.Core/Configuration/Models/ContentSettings.cs
@@ -1,6 +1,6 @@
using System;
using System.Collections.Generic;
-using Umbraco.Core.Configuration.UmbracoSettings;
+using Umbraco.Core.Configuration.Models.Validation;
using Umbraco.Core.Macros;
namespace Umbraco.Core.Configuration.Models
@@ -16,7 +16,7 @@ namespace Umbraco.Core.Configuration.Models
public bool ResolveUrlsFromTextString { get; set; } = false;
- public IEnumerable Error404Collection { get; set; } = Array.Empty();
+ public ContentErrorPage[] Error404Collection { get; set; } = Array.Empty();
public string PreviewBadge { get; set; } = DefaultPreviewBadge;
diff --git a/src/Umbraco.Core/Configuration/Models/HostingSettings.cs b/src/Umbraco.Core/Configuration/Models/HostingSettings.cs
index 0863181922..b003315c56 100644
--- a/src/Umbraco.Core/Configuration/Models/HostingSettings.cs
+++ b/src/Umbraco.Core/Configuration/Models/HostingSettings.cs
@@ -1,4 +1,6 @@
-namespace Umbraco.Core.Configuration.Models
+using System;
+
+namespace Umbraco.Core.Configuration.Models
{
public class HostingSettings
{
diff --git a/src/Umbraco.Core/Configuration/Models/ImagingAutoFillUploadField.cs b/src/Umbraco.Core/Configuration/Models/ImagingAutoFillUploadField.cs
new file mode 100644
index 0000000000..f58e2bb4f8
--- /dev/null
+++ b/src/Umbraco.Core/Configuration/Models/ImagingAutoFillUploadField.cs
@@ -0,0 +1,23 @@
+using System.ComponentModel.DataAnnotations;
+using Umbraco.Core.Configuration.Models.Validation;
+
+namespace Umbraco.Core.Configuration.Models
+{
+ public class ImagingAutoFillUploadField : ValidatableEntryBase
+ {
+ [Required]
+ public string Alias { get; set; }
+
+ [Required]
+ public string WidthFieldAlias { get; set; }
+
+ [Required]
+ public string HeightFieldAlias { get; set; }
+
+ [Required]
+ public string LengthFieldAlias { get; set; }
+
+ [Required]
+ public string ExtensionFieldAlias { get; set; }
+ }
+}
diff --git a/src/Umbraco.Core/Configuration/Models/ModelsBuilderConfig.cs b/src/Umbraco.Core/Configuration/Models/ModelsBuilderSettings.cs
similarity index 98%
rename from src/Umbraco.Core/Configuration/Models/ModelsBuilderConfig.cs
rename to src/Umbraco.Core/Configuration/Models/ModelsBuilderSettings.cs
index e99557755c..414165d2e4 100644
--- a/src/Umbraco.Core/Configuration/Models/ModelsBuilderConfig.cs
+++ b/src/Umbraco.Core/Configuration/Models/ModelsBuilderSettings.cs
@@ -5,7 +5,7 @@ namespace Umbraco.Core.Configuration.Models
///
/// Represents the models builder configuration.
///
- public class ModelsBuilderConfig
+ public class ModelsBuilderSettings
{
public static string DefaultModelsDirectory => "~/App_Data/Models";
diff --git a/src/Umbraco.Core/Configuration/Models/NuCacheSettings.cs b/src/Umbraco.Core/Configuration/Models/NuCacheSettings.cs
index a2bc7d3561..89a726f30a 100644
--- a/src/Umbraco.Core/Configuration/Models/NuCacheSettings.cs
+++ b/src/Umbraco.Core/Configuration/Models/NuCacheSettings.cs
@@ -2,6 +2,6 @@
{
public class NuCacheSettings
{
- public string BTreeBlockSize { get; set; }
+ public int? BTreeBlockSize { get; set; }
}
}
diff --git a/src/Umbraco.Core/Configuration/Models/SmtpSettings.cs b/src/Umbraco.Core/Configuration/Models/SmtpSettings.cs
index a507f8a62f..7c19f28d87 100644
--- a/src/Umbraco.Core/Configuration/Models/SmtpSettings.cs
+++ b/src/Umbraco.Core/Configuration/Models/SmtpSettings.cs
@@ -1,9 +1,14 @@
-using System.Net.Mail;
+using System;
+using System.ComponentModel.DataAnnotations;
+using System.Net.Mail;
+using Umbraco.Core.Configuration.Models.Validation;
namespace Umbraco.Core.Configuration.Models
{
- public class SmtpSettings
+ public class SmtpSettings : ValidatableEntryBase
{
+ [Required]
+ [EmailAddress]
public string From { get; set; }
public string Host { get; set; }
@@ -12,7 +17,7 @@ namespace Umbraco.Core.Configuration.Models
public string PickupDirectoryLocation { get; set; }
- public SmtpDeliveryMethod DeliveryMethod { get; set; }
+ public SmtpDeliveryMethod DeliveryMethod { get; set; } = SmtpDeliveryMethod.Network;
public string Username { get; set; }
diff --git a/src/Umbraco.Core/Configuration/Models/Validation/ConfigurationValidatorBase.cs b/src/Umbraco.Core/Configuration/Models/Validation/ConfigurationValidatorBase.cs
new file mode 100644
index 0000000000..fe8d077166
--- /dev/null
+++ b/src/Umbraco.Core/Configuration/Models/Validation/ConfigurationValidatorBase.cs
@@ -0,0 +1,45 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Umbraco.Core.Configuration.Models.Validation
+{
+ public abstract class ConfigurationValidatorBase
+ {
+ public bool ValidateStringIsOneOfValidValues(string configPath, string value, IEnumerable validValues, out string message)
+ {
+ if (!validValues.InvariantContains(value))
+ {
+ message = $"Configuration entry {configPath} contains an invalid value '{value}', it should be one of the following: '{string.Join(", ", validValues)}'.";
+ return false;
+ }
+
+ message = string.Empty;
+ return true;
+ }
+
+ public bool ValidateCollection(string configPath, IEnumerable values, string validationDescription, out string message)
+ {
+ if (values.Any(x => !x.IsValid()))
+ {
+ message = $"Configuration entry {configPath} contains one or more invalid values. {validationDescription}.";
+ return false;
+ }
+
+ message = string.Empty;
+ return true;
+ }
+
+ public bool ValidateOptionalEntry(string configPath, ValidatableEntryBase value, string validationDescription, out string message)
+ {
+ if (value != null && !value.IsValid())
+ {
+ message = $"Configuration entry {configPath} contains one or more invalid values. {validationDescription}.";
+ return false;
+ }
+
+ message = string.Empty;
+ return true;
+ }
+ }
+}
diff --git a/src/Umbraco.Core/Configuration/Models/Validation/ContentSettingsValidator.cs b/src/Umbraco.Core/Configuration/Models/Validation/ContentSettingsValidator.cs
new file mode 100644
index 0000000000..9ed22f922e
--- /dev/null
+++ b/src/Umbraco.Core/Configuration/Models/Validation/ContentSettingsValidator.cs
@@ -0,0 +1,35 @@
+using System.Collections.Generic;
+using Microsoft.Extensions.Options;
+using Umbraco.Core.Macros;
+
+namespace Umbraco.Core.Configuration.Models.Validation
+{
+ public class ContentSettingsValidator : ConfigurationValidatorBase, IValidateOptions
+ {
+ public ValidateOptionsResult Validate(string name, ContentSettings options)
+ {
+ string message;
+ if (!ValidateError404Collection(options.Error404Collection, out message))
+ {
+ return ValidateOptionsResult.Fail(message);
+ }
+
+ if (!ValidateAutoFillImageProperties(options.Imaging.AutoFillImageProperties, out message))
+ {
+ return ValidateOptionsResult.Fail(message);
+ }
+
+ return ValidateOptionsResult.Success;
+ }
+
+ private bool ValidateError404Collection(IEnumerable values, out string message)
+ {
+ return ValidateCollection($"{Constants.Configuration.ConfigContent}:{nameof(ContentSettings.Error404Collection)}", values, "Culture and one and only one of ContentId, ContentKey and ContentXPath must be specified for each entry", out message);
+ }
+
+ private bool ValidateAutoFillImageProperties(IEnumerable values, out string message)
+ {
+ return ValidateCollection($"{Constants.Configuration.ConfigContent}:{nameof(ContentSettings.Imaging)}:{nameof(ContentSettings.Imaging.AutoFillImageProperties)}", values, "Alias, WidthFieldAlias, HeightFieldAlias, LengthFieldAlias and ExtensionFieldAlias must be specified for each entry", out message);
+ }
+ }
+}
diff --git a/src/Umbraco.Core/Configuration/Models/Validation/GlobalSettingsValidator.cs b/src/Umbraco.Core/Configuration/Models/Validation/GlobalSettingsValidator.cs
new file mode 100644
index 0000000000..ca3fee7999
--- /dev/null
+++ b/src/Umbraco.Core/Configuration/Models/Validation/GlobalSettingsValidator.cs
@@ -0,0 +1,23 @@
+using Microsoft.Extensions.Options;
+
+namespace Umbraco.Core.Configuration.Models.Validation
+{
+ public class GlobalSettingsValidator
+ : ConfigurationValidatorBase, IValidateOptions
+ {
+ public ValidateOptionsResult Validate(string name, GlobalSettings options)
+ {
+ if (!ValidateSmtpSetting(options.Smtp, out var message))
+ {
+ return ValidateOptionsResult.Fail(message);
+ }
+
+ return ValidateOptionsResult.Success;
+ }
+
+ private bool ValidateSmtpSetting(SmtpSettings value, out string message)
+ {
+ return ValidateOptionalEntry($"{Constants.Configuration.ConfigGlobal}:{nameof(GlobalSettings.Smtp)}", value, "A valid From email address is required", out message);
+ }
+ }
+}
diff --git a/src/Umbraco.Core/Configuration/Models/Validation/RequestHandlerSettingsValidator.cs b/src/Umbraco.Core/Configuration/Models/Validation/RequestHandlerSettingsValidator.cs
new file mode 100644
index 0000000000..305fe812f8
--- /dev/null
+++ b/src/Umbraco.Core/Configuration/Models/Validation/RequestHandlerSettingsValidator.cs
@@ -0,0 +1,23 @@
+using Microsoft.Extensions.Options;
+
+namespace Umbraco.Core.Configuration.Models.Validation
+{
+ public class RequestHandlerSettingsValidator : ConfigurationValidatorBase, IValidateOptions
+ {
+ public ValidateOptionsResult Validate(string name, RequestHandlerSettings options)
+ {
+ if (!ValidateConvertUrlsToAscii(options.ConvertUrlsToAscii, out var message))
+ {
+ return ValidateOptionsResult.Fail(message);
+ }
+
+ return ValidateOptionsResult.Success;
+ }
+
+ private bool ValidateConvertUrlsToAscii(string value, out string message)
+ {
+ var validValues = new[] { "try", "true", "false" };
+ return ValidateStringIsOneOfValidValues($"{Constants.Configuration.ConfigRequestHandler}:{nameof(RequestHandlerSettings.ConvertUrlsToAscii)}", value, validValues, out message);
+ }
+ }
+}
diff --git a/src/Umbraco.Core/Configuration/Models/Validation/ValidatableEntryBase.cs b/src/Umbraco.Core/Configuration/Models/Validation/ValidatableEntryBase.cs
new file mode 100644
index 0000000000..32e3c3270b
--- /dev/null
+++ b/src/Umbraco.Core/Configuration/Models/Validation/ValidatableEntryBase.cs
@@ -0,0 +1,15 @@
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+
+namespace Umbraco.Core.Configuration.Models.Validation
+{
+ public abstract class ValidatableEntryBase
+ {
+ internal virtual bool IsValid()
+ {
+ var ctx = new ValidationContext(this);
+ var results = new List();
+ return Validator.TryValidateObject(this, ctx, results, true);
+ }
+ }
+}
diff --git a/src/Umbraco.Core/Configuration/Models/WebRoutingSettings.cs b/src/Umbraco.Core/Configuration/Models/WebRoutingSettings.cs
index 7e0c4d5d8c..476d58c913 100644
--- a/src/Umbraco.Core/Configuration/Models/WebRoutingSettings.cs
+++ b/src/Umbraco.Core/Configuration/Models/WebRoutingSettings.cs
@@ -16,7 +16,7 @@ namespace Umbraco.Core.Configuration.Models
public bool DisableRedirectUrlTracking { get; set; } = false;
- public string UrlProviderMode { get; set; } = UrlMode.Auto.ToString();
+ public UrlMode UrlProviderMode { get; set; } = UrlMode.Auto;
public string UmbracoApplicationUrl { get; set; }
}
diff --git a/src/Umbraco.Core/Configuration/ModelsBuilderConfigExtensions.cs b/src/Umbraco.Core/Configuration/ModelsBuilderConfigExtensions.cs
index edf068e16f..ef80796c8b 100644
--- a/src/Umbraco.Core/Configuration/ModelsBuilderConfigExtensions.cs
+++ b/src/Umbraco.Core/Configuration/ModelsBuilderConfigExtensions.cs
@@ -10,7 +10,7 @@ namespace Umbraco.Core.Configuration
{
private static string _modelsDirectoryAbsolute = null;
- public static string ModelsDirectoryAbsolute(this ModelsBuilderConfig modelsBuilderConfig, IHostingEnvironment hostingEnvironment)
+ public static string ModelsDirectoryAbsolute(this ModelsBuilderSettings modelsBuilderConfig, IHostingEnvironment hostingEnvironment)
{
if (_modelsDirectoryAbsolute is null)
{
diff --git a/src/Umbraco.Core/Constants-Configuration.cs b/src/Umbraco.Core/Constants-Configuration.cs
index 86a02affb6..c06ec8f1ec 100644
--- a/src/Umbraco.Core/Constants-Configuration.cs
+++ b/src/Umbraco.Core/Constants-Configuration.cs
@@ -11,11 +11,30 @@
/// ":" is used as marker for nested objects in json. E.g. "Umbraco:CMS:" = {"Umbraco":{"CMS":{....}}
///
public const string ConfigPrefix = "Umbraco:CMS:";
- public const string ConfigSecurityPrefix = ConfigPrefix+"Security:";
- public const string ConfigGlobalPrefix = ConfigPrefix + "Global:";
- public const string ConfigModelsBuilderPrefix = ConfigPrefix+"ModelsBuilder:";
- public const string ConfigRuntimeMinification = ConfigPrefix+"RuntimeMinification";
- public const string ConfigRuntimeMinificationVersion = ConfigRuntimeMinification+":Version";
+ public const string ConfigActiveDirectory = ConfigPrefix + "ActiveDirectory";
+ public const string ConfigContent = ConfigPrefix + "Content";
+ public const string ConfigCoreDebug = ConfigPrefix + "Core:Debug";
+ public const string ConfigExceptionFilter = ConfigPrefix + "ExceptionFilter";
+ public const string ConfigGlobal = ConfigPrefix + "Global";
+ public const string ConfigHealthChecks = ConfigPrefix + "HealthChecks";
+ public const string ConfigHosting = ConfigPrefix + "Hosting";
+ public const string ConfigImaging = ConfigPrefix + "Imaging";
+ public const string ConfigExamine = ConfigPrefix + "Examine";
+ public const string ConfigKeepAlive = ConfigPrefix + "KeepAlive";
+ public const string ConfigLogging = ConfigPrefix + "Logging";
+ public const string ConfigMemberPassword = ConfigPrefix + "Security:MemberPassword";
+ public const string ConfigModelsBuilder = ConfigPrefix + "ModelsBuilder";
+ public const string ConfigNuCache = ConfigPrefix + "NuCache";
+ public const string ConfigRequestHandler = ConfigPrefix + "RequestHandler";
+ public const string ConfigRuntime = ConfigPrefix + "Runtime";
+ public const string ConfigSecurity = ConfigPrefix + "Security";
+ public const string ConfigTours = ConfigPrefix + "Tours";
+ public const string ConfigTypeFinder = ConfigPrefix + "TypeFinder";
+ public const string ConfigWebRouting = ConfigPrefix + "WebRouting";
+ public const string ConfigUserPassword = ConfigPrefix + "Security:UserPassword";
+
+ public const string ConfigRuntimeMinification = ConfigPrefix + "RuntimeMinification";
+ public const string ConfigRuntimeMinificationVersion = ConfigRuntimeMinification + ":Version";
}
}
}
diff --git a/src/Umbraco.Core/Models/PublishedContent/ModelType.cs b/src/Umbraco.Core/Models/PublishedContent/ModelType.cs
index dd60eb9beb..94e7958780 100644
--- a/src/Umbraco.Core/Models/PublishedContent/ModelType.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/ModelType.cs
@@ -390,7 +390,6 @@ namespace Umbraco.Core.Models.PublishedContent
protected override bool IsCOMObjectImpl()
=> false;
-
public override object InvokeMember(string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] namedParameters)
{
throw new NotSupportedException();
diff --git a/src/Umbraco.Core/Routing/UrlProvider.cs b/src/Umbraco.Core/Routing/UrlProvider.cs
index 69d2e00276..9dd4a413a2 100644
--- a/src/Umbraco.Core/Routing/UrlProvider.cs
+++ b/src/Umbraco.Core/Routing/UrlProvider.cs
@@ -31,16 +31,9 @@ namespace Umbraco.Web.Routing
_urlProviders = urlProviders;
_mediaUrlProviders = mediaUrlProviders;
_variationContextAccessor = variationContextAccessor ?? throw new ArgumentNullException(nameof(variationContextAccessor));
- var provider = UrlMode.Auto;
- Mode = provider;
-
- if (Enum.TryParse(routingSettings.Value.UrlProviderMode, out provider))
- {
- Mode = provider;
- }
+ Mode = routingSettings.Value.UrlProviderMode;
}
-
private readonly IUmbracoContextAccessor _umbracoContextAccessor;
private readonly IEnumerable _urlProviders;
private readonly IEnumerable _mediaUrlProviders;
diff --git a/src/Umbraco.Web/Compose/BlockEditorComponent.cs b/src/Umbraco.Infrastructure/Compose/BlockEditorComponent.cs
similarity index 100%
rename from src/Umbraco.Web/Compose/BlockEditorComponent.cs
rename to src/Umbraco.Infrastructure/Compose/BlockEditorComponent.cs
diff --git a/src/Umbraco.Web/Compose/BlockEditorComposer.cs b/src/Umbraco.Infrastructure/Compose/BlockEditorComposer.cs
similarity index 100%
rename from src/Umbraco.Web/Compose/BlockEditorComposer.cs
rename to src/Umbraco.Infrastructure/Compose/BlockEditorComposer.cs
diff --git a/src/Umbraco.Web/Compose/NestedContentPropertyComponent.cs b/src/Umbraco.Infrastructure/Compose/NestedContentPropertyComponent.cs
similarity index 100%
rename from src/Umbraco.Web/Compose/NestedContentPropertyComponent.cs
rename to src/Umbraco.Infrastructure/Compose/NestedContentPropertyComponent.cs
diff --git a/src/Umbraco.Web/Compose/NestedContentPropertyComposer.cs b/src/Umbraco.Infrastructure/Compose/NestedContentPropertyComposer.cs
similarity index 100%
rename from src/Umbraco.Web/Compose/NestedContentPropertyComposer.cs
rename to src/Umbraco.Infrastructure/Compose/NestedContentPropertyComposer.cs
diff --git a/src/Umbraco.Infrastructure/Media/UploadAutoFillProperties.cs b/src/Umbraco.Infrastructure/Media/UploadAutoFillProperties.cs
index ff35979fd5..e4ad0f8979 100644
--- a/src/Umbraco.Infrastructure/Media/UploadAutoFillProperties.cs
+++ b/src/Umbraco.Infrastructure/Media/UploadAutoFillProperties.cs
@@ -6,7 +6,6 @@ using Microsoft.Extensions.Logging;
using Umbraco.Core;
using Umbraco.Core.Configuration;
using Umbraco.Core.Configuration.Models;
-using Umbraco.Core.Configuration.UmbracoSettings;
using Umbraco.Core.IO;
using Umbraco.Core.Models;
@@ -38,7 +37,7 @@ namespace Umbraco.Web.Media
/// The auto-fill configuration.
/// Variation language.
/// Variation segment.
- public void Reset(IContentBase content, IImagingAutoFillUploadField autoFillConfig, string culture, string segment)
+ public void Reset(IContentBase content, ImagingAutoFillUploadField autoFillConfig, string culture, string segment)
{
if (content == null) throw new ArgumentNullException(nameof(content));
if (autoFillConfig == null) throw new ArgumentNullException(nameof(autoFillConfig));
@@ -55,7 +54,7 @@ namespace Umbraco.Web.Media
/// The parameter is the path relative to the filesystem.
/// Variation language.
/// Variation segment.
- public void Populate(IContentBase content, IImagingAutoFillUploadField autoFillConfig, string filepath, string culture, string segment)
+ public void Populate(IContentBase content, ImagingAutoFillUploadField autoFillConfig, string filepath, string culture, string segment)
{
if (content == null) throw new ArgumentNullException(nameof(content));
if (autoFillConfig == null) throw new ArgumentNullException(nameof(autoFillConfig));
@@ -94,7 +93,7 @@ namespace Umbraco.Web.Media
/// The stream containing the file data.
/// Variation language.
/// Variation segment.
- public void Populate(IContentBase content, IImagingAutoFillUploadField autoFillConfig, string filepath, Stream filestream, string culture, string segment)
+ public void Populate(IContentBase content, ImagingAutoFillUploadField autoFillConfig, string filepath, Stream filestream, string culture, string segment)
{
if (content == null) throw new ArgumentNullException(nameof(content));
if (autoFillConfig == null) throw new ArgumentNullException(nameof(autoFillConfig));
@@ -112,7 +111,7 @@ namespace Umbraco.Web.Media
}
}
- private static void SetProperties(IContentBase content, IImagingAutoFillUploadField autoFillConfig, Size? size, long length, string extension, string culture, string segment)
+ private static void SetProperties(IContentBase content, ImagingAutoFillUploadField autoFillConfig, Size? size, long length, string extension, string culture, string segment)
{
if (content == null) throw new ArgumentNullException(nameof(content));
if (autoFillConfig == null) throw new ArgumentNullException(nameof(autoFillConfig));
@@ -130,7 +129,7 @@ namespace Umbraco.Web.Media
content.Properties[autoFillConfig.ExtensionFieldAlias].SetValue(extension, culture, segment);
}
- private static void ResetProperties(IContentBase content, IImagingAutoFillUploadField autoFillConfig, string culture, string segment)
+ private static void ResetProperties(IContentBase content, ImagingAutoFillUploadField autoFillConfig, string culture, string segment)
{
if (content == null) throw new ArgumentNullException(nameof(content));
if (autoFillConfig == null) throw new ArgumentNullException(nameof(autoFillConfig));
diff --git a/src/Umbraco.Infrastructure/Routing/NotFoundHandlerHelper.cs b/src/Umbraco.Infrastructure/Routing/NotFoundHandlerHelper.cs
index 6137803c20..ae50baa5b3 100644
--- a/src/Umbraco.Infrastructure/Routing/NotFoundHandlerHelper.cs
+++ b/src/Umbraco.Infrastructure/Routing/NotFoundHandlerHelper.cs
@@ -62,7 +62,7 @@ namespace Umbraco.Web.Routing
}
///
- /// Returns the content id based on the configured IContentErrorPage section
+ /// Returns the content id based on the configured ContentErrorPage section.
///
///
///
diff --git a/src/Umbraco.ModelsBuilder.Embedded/BackOffice/ContentTypeModelValidator.cs b/src/Umbraco.ModelsBuilder.Embedded/BackOffice/ContentTypeModelValidator.cs
index 5f806883f0..023911d518 100644
--- a/src/Umbraco.ModelsBuilder.Embedded/BackOffice/ContentTypeModelValidator.cs
+++ b/src/Umbraco.ModelsBuilder.Embedded/BackOffice/ContentTypeModelValidator.cs
@@ -11,7 +11,7 @@ namespace Umbraco.ModelsBuilder.Embedded.BackOffice
// ReSharper disable once UnusedMember.Global - This is typed scanned
public class ContentTypeModelValidator : ContentTypeModelValidatorBase
{
- public ContentTypeModelValidator(IOptions config) : base(config)
+ public ContentTypeModelValidator(IOptions config) : base(config)
{
}
}
diff --git a/src/Umbraco.ModelsBuilder.Embedded/BackOffice/ContentTypeModelValidatorBase.cs b/src/Umbraco.ModelsBuilder.Embedded/BackOffice/ContentTypeModelValidatorBase.cs
index c1684dde7a..0e4cd4f49a 100644
--- a/src/Umbraco.ModelsBuilder.Embedded/BackOffice/ContentTypeModelValidatorBase.cs
+++ b/src/Umbraco.ModelsBuilder.Embedded/BackOffice/ContentTypeModelValidatorBase.cs
@@ -14,9 +14,9 @@ namespace Umbraco.ModelsBuilder.Embedded.BackOffice
where TModel : ContentTypeSave
where TProperty : PropertyTypeBasic
{
- private readonly IOptions _config;
+ private readonly IOptions _config;
- public ContentTypeModelValidatorBase(IOptions config)
+ public ContentTypeModelValidatorBase(IOptions config)
{
_config = config;
}
diff --git a/src/Umbraco.ModelsBuilder.Embedded/BackOffice/DashboardReport.cs b/src/Umbraco.ModelsBuilder.Embedded/BackOffice/DashboardReport.cs
index a0928fafcf..c615559920 100644
--- a/src/Umbraco.ModelsBuilder.Embedded/BackOffice/DashboardReport.cs
+++ b/src/Umbraco.ModelsBuilder.Embedded/BackOffice/DashboardReport.cs
@@ -8,11 +8,11 @@ namespace Umbraco.ModelsBuilder.Embedded.BackOffice
{
internal class DashboardReport
{
- private readonly ModelsBuilderConfig _config;
+ private readonly ModelsBuilderSettings _config;
private readonly OutOfDateModelsStatus _outOfDateModels;
private readonly ModelsGenerationError _mbErrors;
- public DashboardReport(IOptions config, OutOfDateModelsStatus outOfDateModels, ModelsGenerationError mbErrors)
+ public DashboardReport(IOptions config, OutOfDateModelsStatus outOfDateModels, ModelsGenerationError mbErrors)
{
_config = config.Value;
_outOfDateModels = outOfDateModels;
diff --git a/src/Umbraco.ModelsBuilder.Embedded/BackOffice/MediaTypeModelValidator.cs b/src/Umbraco.ModelsBuilder.Embedded/BackOffice/MediaTypeModelValidator.cs
index b6cc135e7c..4ccdc1b362 100644
--- a/src/Umbraco.ModelsBuilder.Embedded/BackOffice/MediaTypeModelValidator.cs
+++ b/src/Umbraco.ModelsBuilder.Embedded/BackOffice/MediaTypeModelValidator.cs
@@ -11,7 +11,7 @@ namespace Umbraco.ModelsBuilder.Embedded.BackOffice
// ReSharper disable once UnusedMember.Global - This is typed scanned
public class MediaTypeModelValidator : ContentTypeModelValidatorBase
{
- public MediaTypeModelValidator(IOptions config) : base(config)
+ public MediaTypeModelValidator(IOptions config) : base(config)
{
}
}
diff --git a/src/Umbraco.ModelsBuilder.Embedded/BackOffice/MemberTypeModelValidator.cs b/src/Umbraco.ModelsBuilder.Embedded/BackOffice/MemberTypeModelValidator.cs
index c930642155..9a735631ff 100644
--- a/src/Umbraco.ModelsBuilder.Embedded/BackOffice/MemberTypeModelValidator.cs
+++ b/src/Umbraco.ModelsBuilder.Embedded/BackOffice/MemberTypeModelValidator.cs
@@ -11,7 +11,7 @@ namespace Umbraco.ModelsBuilder.Embedded.BackOffice
// ReSharper disable once UnusedMember.Global - This is typed scanned
public class MemberTypeModelValidator : ContentTypeModelValidatorBase
{
- public MemberTypeModelValidator(IOptions config) : base(config)
+ public MemberTypeModelValidator(IOptions config) : base(config)
{
}
}
diff --git a/src/Umbraco.ModelsBuilder.Embedded/BackOffice/ModelsBuilderDashboardController.cs b/src/Umbraco.ModelsBuilder.Embedded/BackOffice/ModelsBuilderDashboardController.cs
index 1339c79052..3adbc0df2c 100644
--- a/src/Umbraco.ModelsBuilder.Embedded/BackOffice/ModelsBuilderDashboardController.cs
+++ b/src/Umbraco.ModelsBuilder.Embedded/BackOffice/ModelsBuilderDashboardController.cs
@@ -23,14 +23,14 @@ namespace Umbraco.ModelsBuilder.Embedded.BackOffice
[UmbracoApplicationAuthorize(Core.Constants.Applications.Settings)]
public class ModelsBuilderDashboardController : UmbracoAuthorizedJsonController
{
- private readonly ModelsBuilderConfig _config;
+ private readonly ModelsBuilderSettings _config;
private readonly ModelsGenerator _modelGenerator;
private readonly OutOfDateModelsStatus _outOfDateModels;
private readonly ModelsGenerationError _mbErrors;
private readonly DashboardReport _dashboardReport;
private readonly IHostingEnvironment _hostingEnvironment;
- public ModelsBuilderDashboardController(IOptions config, ModelsGenerator modelsGenerator, OutOfDateModelsStatus outOfDateModels, ModelsGenerationError mbErrors, IHostingEnvironment hostingEnvironment)
+ public ModelsBuilderDashboardController(IOptions config, ModelsGenerator modelsGenerator, OutOfDateModelsStatus outOfDateModels, ModelsGenerationError mbErrors, IHostingEnvironment hostingEnvironment)
{
//_umbracoServices = umbracoServices;
_config = config.Value;
diff --git a/src/Umbraco.ModelsBuilder.Embedded/Building/Builder.cs b/src/Umbraco.ModelsBuilder.Embedded/Building/Builder.cs
index 4c90234fab..aa7ab40ba5 100644
--- a/src/Umbraco.ModelsBuilder.Embedded/Building/Builder.cs
+++ b/src/Umbraco.ModelsBuilder.Embedded/Building/Builder.cs
@@ -66,7 +66,7 @@ namespace Umbraco.ModelsBuilder.Embedded.Building
///
/// The list of models to generate.
/// The models namespace.
- protected Builder(ModelsBuilderConfig config, IList typeModels)
+ protected Builder(ModelsBuilderSettings config, IList typeModels)
{
_typeModels = typeModels ?? throw new ArgumentNullException(nameof(typeModels));
@@ -83,7 +83,7 @@ namespace Umbraco.ModelsBuilder.Embedded.Building
protected Builder()
{ }
- protected ModelsBuilderConfig Config { get; }
+ protected ModelsBuilderSettings Config { get; }
///
/// Prepares generation by processing the result of code parsing.
diff --git a/src/Umbraco.ModelsBuilder.Embedded/Building/ModelsGenerator.cs b/src/Umbraco.ModelsBuilder.Embedded/Building/ModelsGenerator.cs
index 0348c287cd..bc97118ee4 100644
--- a/src/Umbraco.ModelsBuilder.Embedded/Building/ModelsGenerator.cs
+++ b/src/Umbraco.ModelsBuilder.Embedded/Building/ModelsGenerator.cs
@@ -11,11 +11,11 @@ namespace Umbraco.ModelsBuilder.Embedded.Building
public class ModelsGenerator
{
private readonly UmbracoServices _umbracoService;
- private readonly ModelsBuilderConfig _config;
+ private readonly ModelsBuilderSettings _config;
private readonly OutOfDateModelsStatus _outOfDateModels;
private readonly IHostingEnvironment _hostingEnvironment;
- public ModelsGenerator(UmbracoServices umbracoService, IOptions config, OutOfDateModelsStatus outOfDateModels, IHostingEnvironment hostingEnvironment)
+ public ModelsGenerator(UmbracoServices umbracoService, IOptions config, OutOfDateModelsStatus outOfDateModels, IHostingEnvironment hostingEnvironment)
{
_umbracoService = umbracoService;
_config = config.Value;
diff --git a/src/Umbraco.ModelsBuilder.Embedded/Building/TextBuilder.cs b/src/Umbraco.ModelsBuilder.Embedded/Building/TextBuilder.cs
index 607aa129b1..43771eb46a 100644
--- a/src/Umbraco.ModelsBuilder.Embedded/Building/TextBuilder.cs
+++ b/src/Umbraco.ModelsBuilder.Embedded/Building/TextBuilder.cs
@@ -18,7 +18,7 @@ namespace Umbraco.ModelsBuilder.Embedded.Building
/// and the result of code parsing.
///
/// The list of models to generate.
- public TextBuilder(ModelsBuilderConfig config, IList typeModels)
+ public TextBuilder(ModelsBuilderSettings config, IList typeModels)
: base(config, typeModels)
{ }
diff --git a/src/Umbraco.ModelsBuilder.Embedded/Compose/ModelsBuilderComponent.cs b/src/Umbraco.ModelsBuilder.Embedded/Compose/ModelsBuilderComponent.cs
index 1088dfb470..837bf18dae 100644
--- a/src/Umbraco.ModelsBuilder.Embedded/Compose/ModelsBuilderComponent.cs
+++ b/src/Umbraco.ModelsBuilder.Embedded/Compose/ModelsBuilderComponent.cs
@@ -21,7 +21,7 @@ namespace Umbraco.ModelsBuilder.Embedded.Compose
{
internal class ModelsBuilderComponent : IComponent
{
- private readonly ModelsBuilderConfig _config;
+ private readonly ModelsBuilderSettings _config;
private readonly IShortStringHelper _shortStringHelper;
private readonly LiveModelsProvider _liveModelsProvider;
private readonly OutOfDateModelsStatus _outOfDateModels;
@@ -29,7 +29,7 @@ namespace Umbraco.ModelsBuilder.Embedded.Compose
private readonly IUmbracoApplicationLifetime _umbracoApplicationLifetime;
private readonly IUmbracoRequestLifetime _umbracoRequestLifetime;
- public ModelsBuilderComponent(IOptions config, IShortStringHelper shortStringHelper,
+ public ModelsBuilderComponent(IOptions config, IShortStringHelper shortStringHelper,
LiveModelsProvider liveModelsProvider, OutOfDateModelsStatus outOfDateModels, LinkGenerator linkGenerator,
IUmbracoRequestLifetime umbracoRequestLifetime, IUmbracoApplicationLifetime umbracoApplicationLifetime)
{
diff --git a/src/Umbraco.ModelsBuilder.Embedded/Compose/ModelsBuilderComposer.cs b/src/Umbraco.ModelsBuilder.Embedded/Compose/ModelsBuilderComposer.cs
index fd5472b223..3e63fb8e94 100644
--- a/src/Umbraco.ModelsBuilder.Embedded/Compose/ModelsBuilderComposer.cs
+++ b/src/Umbraco.ModelsBuilder.Embedded/Compose/ModelsBuilderComposer.cs
@@ -27,7 +27,7 @@ namespace Umbraco.ModelsBuilder.Embedded.Compose
composition.RegisterUnique(factory =>
{
- var config = factory.GetInstance>().Value;
+ var config = factory.GetInstance>().Value;
if (config.ModelsMode == ModelsMode.PureLive)
{
composition.RegisterUnique();
diff --git a/src/Umbraco.ModelsBuilder.Embedded/LiveModelsProvider.cs b/src/Umbraco.ModelsBuilder.Embedded/LiveModelsProvider.cs
index 7e4ad8cfad..b8488e0852 100644
--- a/src/Umbraco.ModelsBuilder.Embedded/LiveModelsProvider.cs
+++ b/src/Umbraco.ModelsBuilder.Embedded/LiveModelsProvider.cs
@@ -20,7 +20,7 @@ namespace Umbraco.ModelsBuilder.Embedded
private static Mutex _mutex;
private static int _req;
private readonly ILogger _logger;
- private readonly ModelsBuilderConfig _config;
+ private readonly ModelsBuilderSettings _config;
private readonly ModelsGenerator _modelGenerator;
private readonly ModelsGenerationError _mbErrors;
private readonly IHostingEnvironment _hostingEnvironment;
@@ -28,7 +28,7 @@ namespace Umbraco.ModelsBuilder.Embedded
// we do not manage pure live here
internal bool IsEnabled => _config.ModelsMode.IsLiveNotPure();
- public LiveModelsProvider(ILogger logger, IOptions config, ModelsGenerator modelGenerator, ModelsGenerationError mbErrors, IHostingEnvironment hostingEnvironment)
+ public LiveModelsProvider(ILogger logger, IOptions config, ModelsGenerator modelGenerator, ModelsGenerationError mbErrors, IHostingEnvironment hostingEnvironment)
{
_logger = logger;
_config = config.Value ?? throw new ArgumentNullException(nameof(config));
diff --git a/src/Umbraco.ModelsBuilder.Embedded/ModelsGenerationError.cs b/src/Umbraco.ModelsBuilder.Embedded/ModelsGenerationError.cs
index a5911bc9c6..dca2fda0dc 100644
--- a/src/Umbraco.ModelsBuilder.Embedded/ModelsGenerationError.cs
+++ b/src/Umbraco.ModelsBuilder.Embedded/ModelsGenerationError.cs
@@ -10,10 +10,10 @@ namespace Umbraco.ModelsBuilder.Embedded
{
public sealed class ModelsGenerationError
{
- private readonly ModelsBuilderConfig _config;
+ private readonly ModelsBuilderSettings _config;
private readonly IHostingEnvironment _hostingEnvironment;
- public ModelsGenerationError(IOptions config, IHostingEnvironment hostingEnvironment)
+ public ModelsGenerationError(IOptions config, IHostingEnvironment hostingEnvironment)
{
_config = config.Value;
_hostingEnvironment = hostingEnvironment;
diff --git a/src/Umbraco.ModelsBuilder.Embedded/OutOfDateModelsStatus.cs b/src/Umbraco.ModelsBuilder.Embedded/OutOfDateModelsStatus.cs
index 85d08ee975..92e0604a16 100644
--- a/src/Umbraco.ModelsBuilder.Embedded/OutOfDateModelsStatus.cs
+++ b/src/Umbraco.ModelsBuilder.Embedded/OutOfDateModelsStatus.cs
@@ -9,10 +9,10 @@ namespace Umbraco.ModelsBuilder.Embedded
{
public sealed class OutOfDateModelsStatus
{
- private readonly ModelsBuilderConfig _config;
+ private readonly ModelsBuilderSettings _config;
private readonly IHostingEnvironment _hostingEnvironment;
- public OutOfDateModelsStatus(IOptions config, IHostingEnvironment hostingEnvironment)
+ public OutOfDateModelsStatus(IOptions config, IHostingEnvironment hostingEnvironment)
{
_config = config.Value;
_hostingEnvironment = hostingEnvironment;
diff --git a/src/Umbraco.ModelsBuilder.Embedded/PureLiveModelFactory.cs b/src/Umbraco.ModelsBuilder.Embedded/PureLiveModelFactory.cs
index 6bf2f4f8c5..18a103d4d2 100644
--- a/src/Umbraco.ModelsBuilder.Embedded/PureLiveModelFactory.cs
+++ b/src/Umbraco.ModelsBuilder.Embedded/PureLiveModelFactory.cs
@@ -40,7 +40,7 @@ namespace Umbraco.ModelsBuilder.Embedded
private static readonly Regex AssemblyVersionRegex = new Regex("AssemblyVersion\\(\"[0-9]+.[0-9]+.[0-9]+.[0-9]+\"\\)", RegexOptions.Compiled);
private static readonly string[] OurFiles = { "models.hash", "models.generated.cs", "all.generated.cs", "all.dll.path", "models.err", "Compiled" };
- private readonly ModelsBuilderConfig _config;
+ private readonly ModelsBuilderSettings _config;
private readonly IHostingEnvironment _hostingEnvironment;
private readonly IApplicationShutdownRegistry _hostingLifetime;
private readonly ModelsGenerationError _errors;
@@ -50,7 +50,7 @@ namespace Umbraco.ModelsBuilder.Embedded
Lazy umbracoServices,
IProfilingLogger profilingLogger,
Microsoft.Extensions.Logging.ILogger logger,
- IOptions config,
+ IOptions config,
IHostingEnvironment hostingEnvironment,
IApplicationShutdownRegistry hostingLifetime,
IPublishedValueFallback publishedValueFallback)
diff --git a/src/Umbraco.PublishedCache.NuCache/DataSource/BTree.cs b/src/Umbraco.PublishedCache.NuCache/DataSource/BTree.cs
index ae7393a91a..99d0e9da38 100644
--- a/src/Umbraco.PublishedCache.NuCache/DataSource/BTree.cs
+++ b/src/Umbraco.PublishedCache.NuCache/DataSource/BTree.cs
@@ -45,11 +45,10 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
var blockSize = 4096;
var appSetting = settings.BTreeBlockSize;
- if (appSetting == null)
+ if (!appSetting.HasValue)
return blockSize;
- if (!int.TryParse(appSetting, out blockSize))
- throw new ConfigurationErrorsException($"Invalid block size value \"{appSetting}\": not a number.");
+ blockSize = appSetting.Value;
var bit = 0;
for (var i = blockSize; i != 1; i >>= 1)
diff --git a/src/Umbraco.Tests.Common/Builders/ConnectionStringsBuilder.cs b/src/Umbraco.Tests.Common/Builders/ConnectionStringsBuilder.cs
deleted file mode 100644
index 4aba98fccd..0000000000
--- a/src/Umbraco.Tests.Common/Builders/ConnectionStringsBuilder.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using Umbraco.Core;
-using Umbraco.Core.Configuration;
-using ConnectionStrings = Umbraco.Core.Configuration.Models.ConnectionStrings;
-
-namespace Umbraco.Tests.Common.Builders
-{
- public class ConnectionStringsBuilder : BuilderBase
- {
- private string _umbracoConnectionString;
-
- public ConnectionStringsBuilder WithUmbracoConnectionString(string umbracoConnectionString)
- {
- _umbracoConnectionString = umbracoConnectionString;
- return this;
- }
-
- public override ConnectionStrings Build()
- {
- var umbracoConnectionString = _umbracoConnectionString ?? string.Empty;
-
- return new ConnectionStrings
- {
- UmbracoConnectionString = new ConfigConnectionString(Constants.System.UmbracoConnectionName, umbracoConnectionString),
- };
- }
- }
-}
diff --git a/src/Umbraco.Tests.Common/Builders/ContentSettingsBuilder.cs b/src/Umbraco.Tests.Common/Builders/ContentSettingsBuilder.cs
deleted file mode 100644
index f5fb1fc08f..0000000000
--- a/src/Umbraco.Tests.Common/Builders/ContentSettingsBuilder.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using Umbraco.Core.Configuration.Models;
-
-namespace Umbraco.Tests.Common.Builders
-{
- public class ContentSettingsBuilder : BuilderBase
- {
- public override ContentSettings Build()
- {
- return new ContentSettings();
- }
- }
-}
diff --git a/src/Umbraco.Tests.Common/Builders/CoreDebugSettingsBuilder.cs b/src/Umbraco.Tests.Common/Builders/CoreDebugSettingsBuilder.cs
deleted file mode 100644
index e14fb0ade5..0000000000
--- a/src/Umbraco.Tests.Common/Builders/CoreDebugSettingsBuilder.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using CoreDebugSettings = Umbraco.Core.Configuration.Models.CoreDebugSettings;
-
-namespace Umbraco.Tests.Common.Builders
-{
- public class CoreDebugSettingsBuilder : BuilderBase
- {
- private bool? _dumpOnTimeoutThreadAbort;
- private bool? _logUncompletedScopes;
-
- public CoreDebugSettingsBuilder WithDumpOnTimeoutThreadAbort(bool dumpOnTimeoutThreadAbort)
- {
- _dumpOnTimeoutThreadAbort = dumpOnTimeoutThreadAbort;
- return this;
- }
-
- public CoreDebugSettingsBuilder WithLogUncompletedScopes(bool logUncompletedScopes)
- {
- _logUncompletedScopes = logUncompletedScopes;
- return this;
- }
-
- public override CoreDebugSettings Build()
- {
- var dumpOnTimeoutThreadAbort = _dumpOnTimeoutThreadAbort ?? false;
- var logUncompletedScopes = _logUncompletedScopes ?? false;
-
- return new CoreDebugSettings
- {
- DumpOnTimeoutThreadAbort = dumpOnTimeoutThreadAbort,
- LogUncompletedScopes = logUncompletedScopes,
- };
- }
- }
-}
diff --git a/src/Umbraco.Tests.Common/Builders/GlobalSettingsBuilder.cs b/src/Umbraco.Tests.Common/Builders/GlobalSettingsBuilder.cs
deleted file mode 100644
index d39bd71d2e..0000000000
--- a/src/Umbraco.Tests.Common/Builders/GlobalSettingsBuilder.cs
+++ /dev/null
@@ -1,207 +0,0 @@
-using Umbraco.Core.Configuration.Models;
-
-namespace Umbraco.Tests.Common.Builders
-{
- public class GlobalSettingsBuilder : GlobalSettingsBuilder