clsPreferences contains almost no explicit validation/business-rule logic; the rules below are implicit behavioral constraints inferred from code structure, not named/enforced business rules with an AddErrorMessage()-style validation pattern (that pattern was not found in this file).
BR-PREF-001: Preference scoping by application and page¶
Field
Value
Statement
A preference lookup is scoped by the combination of application name and page name (except WebLevel, which is page-agnostic).*
Trigger
Any Item read or Add/Remove/Clear write.
Enforcement
PageKey(scope) returns an empty string for non-PageLevel scopes; comparisons in Item/Add/Remove/Clear filter by (ApplicationName, Pagename).
Outcome
Reads/writes only affect the matching application+scope group; cross-scope leakage does not occur by design.
Save() only persists preference groups belonging to the current application (m_Application), even though _Preferences may contain groups for other applications loaded for the same user.*
Trigger
Calling Save().
Enforcement
Save() iterates _Preferences and invokes SavePreferences only when pref.ApplicationName = m_Application.
Outcome
Preference groups for other applications (loaded in the same user session) are never written back by this instance.
These rules describe implicit behavioral constraints derived from code structure rather than named validation logic.
Note: Statements marked with * were inferred from code structure, naming conventions, or
contextual evidence where direct confirmation was not available in source artifacts. Statements
marked with ** could not be confirmed; treat as unknown until verified.