Revert files that shouldn't change back in v11
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user