Window Framework for UI Toolkit v2.0.x
GWG.WindowFramework.Theming.IPlayerThemeRecoveryExtension Interface Reference

Compiled purchaser-defined handler for one namespaced portable theme section. More...

Inheritance diagram for GWG.WindowFramework.Theming.IPlayerThemeRecoveryExtension:
Collaboration diagram for GWG.WindowFramework.Theming.IPlayerThemeRecoveryExtension:

Public Member Functions

bool TryRecover (string sectionJson, out string recoveredJson, out System.Collections.Generic.IReadOnlyList< string > issues, out string error)
 Omits invalid supported overrides and explains each configured-default fallback.
Public Member Functions inherited from GWG.WindowFramework.Theming.IPlayerThemeExtension
IDisposable Apply (VisualElement scope, string sectionJson)
 Applies already validated settings within an explicit scope.
string Snapshot (VisualElement scope)
 Exports current effective purchaser settings, including its authoritative defaults.
bool Validate (string sectionJson, out string error)
 Validates every supported key and explicit value without mutating UI or files.

Additional Inherited Members

Properties inherited from GWG.WindowFramework.Theming.IPlayerThemeExtension
string Namespace [get]
 Gets a stable dotted namespace, such as mygame.inventory.

Detailed Description

Compiled purchaser-defined handler for one namespaced portable theme section.

Implementations are registered by application code, never instantiated from JSON type names. Section JSON is bounded by the manifest parser. Validate your own keys, numeric limits and defaults; never execute contents or open unvalidated paths. Implement IPlayerThemeAssetExtension for declared raster resources loaded/copied by the framework; data-only handlers need no changes. Unknown sections remain opaque on export. Register before discovery and release UI leases before textures.

// Register a compiled implementation before importing player themes.
// handler.Validate(sectionJson, out error);
// using (handler.Apply(scope, sectionJson)) { /* scoped theme lifetime *&zwj;/ }

Compiled extension capability for recovering supported invalid fields without applying them.

Implement alongside strict validation. The registry validates the recovered object again before application. Unknown keys, unsafe assets and resource violations remain fatal. Original namespace JSON is retained for round trips; recovery must not mutate UI, files or acquire resources.

Member Function Documentation

◆ TryRecover()

bool GWG.WindowFramework.Theming.IPlayerThemeRecoveryExtension.TryRecover ( string sectionJson,
out string recoveredJson,
out System.Collections.Generic.IReadOnlyList< string > issues,
out string error )

Omits invalid supported overrides and explains each configured-default fallback.

Parameters
sectionJsonStructurally validated original namespace object.
recoveredJsonSafe object containing only valid overrides on success.
issuesBounded plain-text field explanations and suggested corrections.
errorFatal section explanation, without source payloads or absolute paths.
Returns
False for a fatal section; true for a safe recovered object.