Archived
deploy webservice static-file routing for docsite folder URLs, per-instance step-cache db, and constant-height panel title bars.
This commit is contained in:
@@ -576,6 +576,46 @@ Class SynList<T>
|
||||
|
||||
|
||||
|
||||
<a id="Hi_Common_Collections_SynList_1_AddAndGetIndex_" data-uid="Hi.Common.Collections.SynList`1.AddAndGetIndex*"></a>
|
||||
|
||||
<h3 id="Hi_Common_Collections_SynList_1_AddAndGetIndex__0_" data-uid="Hi.Common.Collections.SynList`1.AddAndGetIndex(`0)">
|
||||
AddAndGetIndex(T)
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="markdown level1 summary"><p>Atomically appends <code class="paramref">item</code> and returns the index it was inserted at.
|
||||
Use this instead of <a class="xref" href="Hi.Common.Collections.SynList-1.html#Hi_Common_Collections_SynList_1_Add__0_">Add(T)</a> + <a class="xref" href="Hi.Common.Collections.SynList-1.html#Hi_Common_Collections_SynList_1_Count">Count</a> when the caller needs the
|
||||
position of the just-added item under concurrent appends (computing <code>Count - 1</code>
|
||||
after <a class="xref" href="Hi.Common.Collections.SynList-1.html#Hi_Common_Collections_SynList_1_Add__0_">Add(T)</a> would race with other writers).</p>
|
||||
</div>
|
||||
<div class="markdown level1 conceptual"></div>
|
||||
|
||||
<div class="codewrapper">
|
||||
<pre><code class="lang-csharp hljs">public int AddAndGetIndex(T item)</code></pre>
|
||||
</div>
|
||||
|
||||
<h4 class="section">Parameters</h4>
|
||||
<dl class="parameters">
|
||||
<dt><code>item</code> <span class="xref">T</span></dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
|
||||
<h4 class="section">Returns</h4>
|
||||
<dl class="parameters">
|
||||
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a id="Hi_Common_Collections_SynList_1_Clear_" data-uid="Hi.Common.Collections.SynList`1.Clear*"></a>
|
||||
|
||||
<h3 id="Hi_Common_Collections_SynList_1_Clear" data-uid="Hi.Common.Collections.SynList`1.Clear">
|
||||
|
||||
Reference in New Issue
Block a user