Skip to content

Normalize event/callback naming conventions (#260) - #301

Merged
Chris Anderson (codemonkeychris) merged 3 commits into
mainfrom
fix/260-event-callback-naming
May 19, 2026
Merged

Chris Anderson (codemonkeychris) merged 3 commits into
mainfrom
fix/260-event-callback-naming

Conversation

@sundaramramaswamy

Copy link
Copy Markdown
Collaborator

Summary

Two changes to normalize event/callback naming conventions:

Part A: DSL callback prefix

Renamed AccessKeyDisplayRequested extension methods to OnAccessKeyDisplayRequested to match the OnX convention used by all other DSL callbacks. Old names kept as [Obsolete] shims forwarding to the new methods.

Part B: NavigationDiagnostics event types

Changed all 9 NavigationDiagnostics events from Action<T> to EventHandler<T> to follow .NET event guidelines. The event-args classes (NavigationDiagnosticEvent, CacheDiagnosticEvent, TransitionDiagnosticEvent, DeepLinkDiagnosticEvent) are unchanged — only the delegate shape changes.

Changed files

File Change
ElementExtensions.cs New OnAccessKeyDisplayRequested + [Obsolete] shim
NavigationDiagnostics.cs 9 events: Action<T> → EventHandler<T>
NavigationDiagnosticsCoverageTests.cs Handler types updated
reactor.api.txt (×2) New OnAccessKeyDisplayRequested entries

Fixes #260

Rename bare-name AccessKeyDisplayRequested extension
to OnAccessKeyDisplayRequested with [Obsolete] shim.
Change NavigationDiagnostics events from Action<T> to
EventHandler<T> to follow .NET event guidelines. Update
reactor.api.txt and test handlers.

Fixes #260

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update handler signatures from Action<T> to
EventHandler<T> (object? sender, T e) pattern
in NavigationDemo diagnostics and selftest
NavigationCoverageFixtures.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update diagnostic event handlers from Action<T> to
EventHandler<T> to match the changed event signatures
in NavigationDiagnostics.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@codemonkeychris
Chris Anderson (codemonkeychris) merged commit e51c849 into main May 19, 2026
9 checks passed
@codemonkeychris
Chris Anderson (codemonkeychris) deleted the fix/260-event-callback-naming branch May 19, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API consistency: event/callback naming mixes OnX, bare names, and CLR events

2 participants