Table of Contents

Conventions

The rules and shared contracts every Anatomy page assumes. A page in this folder describes something that is true across screens rather than something a reader can point at: how a message reaches the user, how a control behaves when its model is wrong, how a file path is stored, how a component releases what it indexed on the server.

Ordered from the rules that bind every page in both applications, through the two shared UI contracts, down to the service patterns and the canvas transport beneath them.

Rules That Bind Every Page

Message and Exception Handling

HiNC uses three independent message categories: Diagnostic (IProgress<object>), UI Notification (MessageBoardUtil), and App Log (ILogger). See Message Management for the full design pattern.

For async exception handling, use CatchExceptions with a caller-provided handler:

await task.CatchExceptions(ex => progress?.Report(ex));

The Bottom Message Bar displays UI-level notifications. The Session Message Panel displays session diagnostic messages.

Loose Manner

The Loose Manner pattern handles rapidly-called synchronous actions where only the last call needs to be effective.

The LooseRunner class manages skippable rapid-calling synchronous actions. When an action is called rapidly, only the last call is executed while previous calls are safely skipped. The TryRun method is used to execute actions in this manner.

The LooseRunner should be disposed when its owner is disposed to ensure proper resource cleanup.

Loose Couple

If the model of a UI component is null or mismatched, apply a status badge instead of throwing an exception, so the rest of the UI keeps working.

Pages

See Also

  • Platform — the other cross-screen folder: the machinery these rules are applied on top of, including the host process that starts HiAPI
  • App Shell — the window frame these conventions are applied inside
  • Widgets — the reusable controls that implement two of them