This commit is contained in:
2025-09-15 16:51:51 +08:00
parent 6a4e515562
commit a69e02dd26
29 changed files with 319 additions and 117 deletions
@@ -90,13 +90,13 @@
<h2 id="overview">Overview</h2>
<p>A connection-scoped indexing pattern for referencing backend objects across hierarchical SignalR hub connections.</p>
<h2 id="core-components">Core Components</h2>
<p><strong>&lt;xref:HiNC_2025_webapi.Common.DictionaryService&gt;</strong>: Manages connection-scoped index dictionaries</p>
<p><code>DictionaryService</code>: Manages connection-scoped index dictionaries</p>
<ul>
<li>First layer key: Hub connectionId (auto-generated by SignalR)</li>
<li>Second layer key: LocalId (resource name)</li>
<li>Value: References to backend objects (functions, getters/setters)</li>
</ul>
<p><strong>&lt;xref:HiNC_2025_webapi.Common.DictionaryHub&gt;</strong>: Base hub that auto-cleans index entries on disconnect</p>
<p><code>DictionaryHub</code>: Base hub that auto-cleans index entries on disconnect</p>
<h2 id="architecture">Architecture</h2>
<pre><code>Root-Hub
└── Child-Hub - has parent's connectionId
@@ -131,6 +131,8 @@ catch (Exception ex)
<p>See <a href="widget/gui-file-path-assignment.html">GUI File Path Assignment</a>.</p>
<h2 id="numeric-inputoutput-handling">Numeric Input/Output Handling</h2>
<p>Implement a <code>numeric-utils.js</code> module to handle special floating-point values in web forms. See <a href="widget/numeric-io-utilities.html">Numeric Input/Output Utilities</a> for implementation details.</p>
<h2 id="dictionaryservice-pattern-for-hierarchical-components">DictionaryService Pattern for Hierarchical Components</h2>
<p>For web applications with hierarchical SignalR hub connections, use the <a href="common/dictionary-service-pattern.html">DictionaryService and DictionaryHub Pattern</a> to manage connection-scoped object indexing. This pattern provides isolation between components, supports nested components without conflicts, and ensures automatic cleanup of resources on disconnect.</p>
<h2 id="translation-remarks">Translation Remarks</h2>
<p>See <a href="translation-remarks.html">Translation Remarks</a>.</p>