Revert files that shouldn't change back in v11

This commit is contained in:
Sebastiaan Janssen
2022-09-19 16:37:24 +02:00
parent 85147fb5e8
commit db5d05d641
201 changed files with 933 additions and 1859 deletions

View File

@@ -23,8 +23,13 @@ public class ConfigureConnectionStrings : IConfigureNamedOptions<ConnectionStrin
public void Configure(ConnectionStrings options) => Configure(Options.DefaultName, options);
/// <inheritdoc />
public void Configure(string name, ConnectionStrings options)
public void Configure(string? name, ConnectionStrings options)
{
if (name is null)
{
throw new InvalidOperationException("The name of the option instance is required.");
}
// Default to using UmbracoConnectionName
if (name == Options.DefaultName)
{

View File

@@ -19,30 +19,36 @@ public class RequestHandlerSettings
internal static readonly CharItem[] DefaultCharCollection =
{
new () { Char = " ", Replacement = "-" },
new () { Char = "\"", Replacement = string.Empty },
new () { Char = "'", Replacement = string.Empty },
new () { Char = "%", Replacement = string.Empty },
new () { Char = ".", Replacement = string.Empty },
new () { Char = ";", Replacement = string.Empty },
new () { Char = "/", Replacement = string.Empty },
new () { Char = "\\", Replacement = string.Empty },
new () { Char = ":", Replacement = string.Empty },
new () { Char = "#", Replacement = string.Empty },
new () { Char = "+", Replacement = "plus" },
new () { Char = "*", Replacement = "star" },
new () { Char = "&", Replacement = string.Empty },
new () { Char = "?", Replacement = string.Empty },
new () { Char = "æ", Replacement = "ae" },
new () { Char = "ä", Replacement = "ae" },
new () { Char = "ø", Replacement = "oe" },
new () { Char = "ö", Replacement = "oe" },
new () { Char = "å", Replacement = "aa" },
new () { Char = "ü", Replacement = "ue" },
new () { Char = "ß", Replacement = "ss" },
new () { Char = "|", Replacement = "-" },
new () { Char = "<", Replacement = string.Empty },
new () { Char = ">", Replacement = string.Empty },
new() { Char = " ", Replacement = "-" },
new() { Char = "\"", Replacement = string.Empty },
new() { Char = "'", Replacement = string.Empty },
new() { Char = "%", Replacement = string.Empty },
new() { Char = ".", Replacement = string.Empty },
new() { Char = ";", Replacement = string.Empty },
new() { Char = "/", Replacement = string.Empty },
new() { Char = "\\", Replacement = string.Empty },
new() { Char = ":", Replacement = string.Empty },
new() { Char = "#", Replacement = string.Empty },
new() { Char = "&", Replacement = string.Empty },
new() { Char = "?", Replacement = string.Empty },
new() { Char = "<", Replacement = string.Empty },
new() { Char = ">", Replacement = string.Empty },
new() { Char = "+", Replacement = "plus" },
new() { Char = "*", Replacement = "star" },
new() { Char = "æ", Replacement = "ae" },
new() { Char = "Æ", Replacement = "ae" },
new() { Char = "ä", Replacement = "ae" },
new() { Char = "Ä", Replacement = "ae" },
new() { Char = "ø", Replacement = "oe" },
new() { Char = "Ø", Replacement = "oe" },
new() { Char = "ö", Replacement = "oe" },
new() { Char = "Ö", Replacement = "oe" },
new() { Char = "å", Replacement = "aa" },
new() { Char = "Å", Replacement = "aa" },
new() { Char = "ü", Replacement = "ue" },
new() { Char = "Ü", Replacement = "ue" },
new() { Char = "ß", Replacement = "ss" },
new() { Char = "|", Replacement = "-" },
};
/// <summary>
@@ -73,13 +79,6 @@ public class RequestHandlerSettings
[DefaultValue(StaticEnableDefaultCharReplacements)]
public bool EnableDefaultCharReplacements { get; set; } = StaticEnableDefaultCharReplacements;
/// <summary>
/// Add additional character replacements, or override defaults
/// </summary>
[Obsolete(
"Use the GetCharReplacements extension method in the Umbraco.Extensions namespace instead. Scheduled for removal in V11")]
public IEnumerable<IChar> CharCollection { get; set; } = DefaultCharCollection;
/// <summary>
/// Add additional character replacements, or override defaults
/// </summary>

View File

@@ -11,7 +11,7 @@ namespace Umbraco.Cms.Core.Configuration.Models.Validation;
public class ContentSettingsValidator : ConfigurationValidatorBase, IValidateOptions<ContentSettings>
{
/// <inheritdoc />
public ValidateOptionsResult Validate(string name, ContentSettings options)
public ValidateOptionsResult Validate(string? name, ContentSettings options)
{
if (!ValidateError404Collection(options.Error404Collection, out var message))
{

View File

@@ -12,7 +12,7 @@ public class GlobalSettingsValidator
: ConfigurationValidatorBase, IValidateOptions<GlobalSettings>
{
/// <inheritdoc />
public ValidateOptionsResult Validate(string name, GlobalSettings options)
public ValidateOptionsResult Validate(string? name, GlobalSettings options)
{
if (!ValidateSmtpSetting(options.Smtp, out var message))
{

View File

@@ -19,7 +19,7 @@ public class HealthChecksSettingsValidator : ConfigurationValidatorBase, IValida
public HealthChecksSettingsValidator(ICronTabParser cronTabParser) => _cronTabParser = cronTabParser;
/// <inheritdoc />
public ValidateOptionsResult Validate(string name, HealthChecksSettings options)
public ValidateOptionsResult Validate(string? name, HealthChecksSettings options)
{
if (!ValidateNotificationFirstRunTime(options.Notification.FirstRunTime, out var message))
{

View File

@@ -11,7 +11,7 @@ namespace Umbraco.Cms.Core.Configuration.Models.Validation;
public class RequestHandlerSettingsValidator : ConfigurationValidatorBase, IValidateOptions<RequestHandlerSettings>
{
/// <inheritdoc />
public ValidateOptionsResult Validate(string name, RequestHandlerSettings options)
public ValidateOptionsResult Validate(string? name, RequestHandlerSettings options)
{
if (!ValidateConvertUrlsToAscii(options.ConvertUrlsToAscii, out var message))
{

View File

@@ -1,4 +1,4 @@
// Copyright (c) Umbraco.
// Copyright (c) Umbraco.
// See LICENSE for more details.
using Microsoft.Extensions.Options;
@@ -12,7 +12,7 @@ public class UnattendedSettingsValidator
: IValidateOptions<UnattendedSettings>
{
/// <inheritdoc />
public ValidateOptionsResult Validate(string name, UnattendedSettings options)
public ValidateOptionsResult Validate(string? name, UnattendedSettings options)
{
if (options.InstallUnattended)
{