Class HostingSettingsValidator
Validator for configuration represented as HostingSettings.
Namespace: Umbraco.Cms.Core.Configuration.Models.Validation
Assembly: Umbraco.Core.dll
Syntax
public class HostingSettingsValidator : ConfigurationValidatorBase
Remarks
This is a best-effort, config-time check on the machine identifier length. It only covers the two
config-supplied inputs — MachineIdentifier and
SiteName — and assumes the default provider order in which an explicit
MachineIdentifier takes priority over Environment.MachineName.
It intentionally does NOT run the IMachineIdentityProvider chain,
so it does not cover the base name produced by the Azure WEBSITE_INSTANCE_ID provider (an environment
variable, not config) or by any custom provider, nor a reordered or replaced provider collection. Those
cases are caught only by the runtime length guard in
GetMachineIdentifier(), which throws on boot.
Constructors
View SourceHostingSettingsValidator()
Declaration
public HostingSettingsValidator()
Methods
View SourceValidate(string?, HostingSettings)
Declaration
public ValidateOptionsResult Validate(string? name, HostingSettings options)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | |
| HostingSettings | options |
Returns
| Type | Description |
|---|---|
| ValidateOptionsResult |