AppSurfaceThemeId DefaultTheme { get; set; }
Source
Gets or sets the pair used by IAppSurfaceThemeResolver.ResolveDefault.
Registers immutable AppSurface theme-pair services for a host.
IServiceCollection AddAppSurfaceTheming(this IServiceCollection services, Action<AppSurfaceThemeRegistryOptions> configure)
Source
Validates and registers configured semantic pairs and their default resolver.
servicesService collection receiving the sealed registry.configureHost configuration for pairs and the default mode.The original services instance.
ArgumentNullExceptionThrown when an argument is null.AppSurfaceThemeValidationExceptionThrown when configuration cannot safely produce a complete pair.IServiceCollection AddAppSurfaceTheming(this IServiceCollection services, AppSurfaceThemeRegistryOptions options)
Source
Validates and registers an explicit semantic pair configuration snapshot.
servicesService collection receiving the sealed registry.optionsHost configuration for pairs and the default mode.The original services instance.
ArgumentNullExceptionThrown when an argument is null.AppSurfaceThemeValidationExceptionThrown when configuration cannot safely produce a complete pair.IServiceCollection AddRequiredThemeExtension<TSettings>(this IServiceCollection services)
Source
Requires an application-owned extension provider to cover every configured semantic pair.
TSettingsApplication-owned non-null settings type.servicesService collection receiving the required-provider validator.The original services instance.
ArgumentNullExceptionThrown when services is null.AppSurfaceThemeValidationExceptionThrown when IAppSurfaceThemeRegistry is first resolved and the provider is missing (ASTHEME201) or supplies no non-null setting for a registered pair (ASTHEME202). This method itself does not throw it.Register IAppSurfaceThemeExtensionProvider{TSettings} before the neutral registry is first resolved. The provider remains application-owned: this method verifies only provider presence and one non-null setting for each registered pair. It neither validates, serializes, nor logs TSettings.
Configures registered theme pairs and the host's default rendering mode.
AppSurfaceThemeId DefaultTheme { get; set; }
Source
Gets or sets the pair used by IAppSurfaceThemeResolver.ResolveDefault.
AppSurfaceThemeMode DefaultMode { get; set; }
Source
Gets or sets the host's default browser rendering mode.
IList<AppSurfaceThemePair> Pairs { get; }
Source
Gets the registered semantic light/dark pairs.
Looks up validated registered pairs by identifier.
AppSurfaceThemePair GetRequired(AppSurfaceThemeId id)
Source
Gets a sealed pair by its canonical identifier.
idRegistered pair identifier.The sealed semantic pair.
KeyNotFoundExceptionThrown when id is not registered.IReadOnlyCollection<AppSurfaceThemeId> ThemeIds { get; }
Source
Gets the canonical ids of every sealed registered pair in registration order.
Resolves the host-selected default theme pair.
AppSurfaceThemeResolution ResolveDefault()
Source
Resolves the sealed pair and rendering mode configured by the host.
The host's default semantic theme resolution.
Provides a stable, safe theme configuration diagnostic.
CodeStable ASTHEME diagnostic code.SeveritySafety impact of the condition.ProblemSafe one-line failure description.CauseSafe explanation with applicable pair, role, or configuration path.FixConcrete remediation.DocumentationCanonical troubleshooting link.AppSurfaceThemeDiagnostic Create(string code, string problem, string cause, string fix, AppSurfaceThemeDiagnosticSeverity severity = AppSurfaceThemeDiagnosticSeverity.Error)
Source
Creates a diagnostic linked to the canonical theme troubleshooting reference.
codeStable diagnostic code.problemSafe one-line failure description.causeSafe explanation.fixConcrete remediation.severitySafety impact of the condition.A stable diagnostic with its canonical documentation link.
Thrown when a theme registry cannot produce a safe sealed snapshot.
IReadOnlyList<AppSurfaceThemeDiagnostic> Diagnostics { get; }
Source
Gets all safe diagnostics that prevented registry creation.
Validates and resolves immutable semantic theme pairs.
AppSurfaceThemePair GetRequired(AppSurfaceThemeId id)
Source
Gets a sealed pair by its canonical identifier.
idRegistered pair identifier.A defensive snapshot of the registered pair.
KeyNotFoundExceptionThrown when id is not registered.AppSurfaceThemeResolution ResolveDefault()
Source
Resolves the host-selected default pair and mode.
A defensive snapshot of the default resolution.
IReadOnlyList<AppSurfaceThemeDiagnostic> Validate(AppSurfaceThemeRegistryOptions options)
Source
Validates a candidate registry configuration without creating a registry.
optionsCandidate host configuration.All stable diagnostics that prevent safe registry creation.
bool IsSafeResolution(AppSurfaceThemeResolution? resolution)
Source
Determines whether a sealed resolution can be safely consumed by a package-owned adapter.
resolutionThe resolution to validate.true when the resolution satisfies the neutral pair contract; otherwise false.
This predicate is intended for adapters that need a fail-closed boundary without serializing a Web document. It applies the same identifier, mode, role, and contrast checks used for registry registration.
Classifies the safety impact of a theme diagnostic.
Identifies a registered semantic theme pair.
string Value { get; }
Source
Gets the canonical identifier value.
Defines the minimum semantic color roles consumed by AppSurface-owned UI.
string Canvas { get; }
Source
Gets the primary page canvas color.
string Surface { get; }
Source
Gets the default content-surface color.
string RaisedSurface { get; }
Source
Gets the raised content-surface color.
string Text { get; }
Source
Gets the primary readable text color.
string MutedText { get; }
Source
Gets the secondary readable text color.
string Border { get; }
Source
Gets the visible border and divider color.
string Accent { get; }
Source
Gets the default accent color.
string AccentStrong { get; }
Source
Gets the high-emphasis accent color.
string Link { get; }
Source
Gets the unvisited link color.
string VisitedLink { get; }
Source
Gets the visited link color.
string Danger { get; }
Source
Gets the error and destructive-action color.
string Focus { get; }
Source
Gets the keyboard-visible focus color.
Pairs complete light and dark semantic role sets under one identifier.
AppSurfaceThemePair AppSurface()
Source
Creates AppSurface's built-in accessible semantic pair.
A new immutable pair instance named appsurface.
AppSurfaceThemeId Id { get; }
Source
Gets the canonical pair identifier.
AppSurfaceThemeRoles Light { get; }
Source
Gets the complete light role set.
AppSurfaceThemeRoles Dark { get; }
Source
Gets the complete dark role set.
Represents the sealed default pair together with its host-selected mode.
AppSurfaceThemeId Id { get; }
Source
Gets the resolved pair identifier.
AppSurfaceThemeMode Mode { get; }
Source
Gets the host-selected rendering mode.
AppSurfaceThemeRoles Light { get; }
Source
Gets the sealed light role set.
AppSurfaceThemeRoles Dark { get; }
Source
Gets the sealed dark role set.
Allows an adapter to obtain application-owned settings for a registered pair.
TSettingsApplication-owned settings type. Neutral theming neither validates nor serializes it.bool TryGet(AppSurfaceThemeId themeId, out TSettings settings)
Source
Attempts to get settings for the supplied sealed pair.
themeIdRegistered theme-pair identifier.settingsApplication-owned settings when available.true when settings exist for themeId; otherwise false.
Identifies the host-selected rendering behavior for a semantic theme pair.