2025-07-18 15:38:28 +08:00

922 lines
26 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class IndexSegment | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class IndexSegment | HiAPI-C# 2025 ">
<meta name="description" content="Represents a segment of indices with a beginning and ending point. Used for defining ranges of data in collections or arrays.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.Common.IndexSegment">
<h1 id="Hi_Common_IndexSegment" data-uid="Hi.Common.IndexSegment" class="text-break">
Class IndexSegment
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.Common.html">Common</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiGeom.dll</dd></dl>
</div>
<div class="markdown summary"><p>Represents a segment of indices with a beginning and ending point.
Used for defining ranges of data in collections or arrays.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class IndexSegment : IEquatable&lt;IndexSegment&gt;, IMakeXmlSource</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">IndexSegment</span></div>
</dd>
</dl>
<dl class="typelist implements">
<dt>Implements</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable</a>&lt;<a class="xref" href="Hi.Common.IndexSegment.html">IndexSegment</a>&gt;</div>
<div><a class="xref" href="Hi.Common.XmlUtils.IMakeXmlSource.html">IMakeXmlSource</a></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
</dd></dl>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>
<dd>
<div>
<a class="xref" href="Hi.Common.DuplicateUtil.html#Hi_Common_DuplicateUtil_TryDuplicate__1___0_System_Object___">DuplicateUtil.TryDuplicate&lt;TSelf&gt;(TSelf, params object[])</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke&lt;TSrc&gt;(TSrc, Action&lt;TSrc&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke&lt;TSrc, TDst&gt;(TSrc, Func&lt;TSrc, TDst&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.XmlUtils.XmlUtil.html#Hi_Common_XmlUtils_XmlUtil_MakeXmlSourceFile_Hi_Common_XmlUtils_IMakeXmlSource_System_String_">XmlUtil.MakeXmlSourceFile(IMakeXmlSource, string)</a>
</div>
<div>
<a class="xref" href="Hi.Common.XmlUtils.XmlUtil.html#Hi_Common_XmlUtils_XmlUtil_MakeXmlSourceWithRebaseFile_Hi_Common_XmlUtils_IMakeXmlSource_System_String_System_String_">XmlUtil.MakeXmlSourceWithRebaseFile(IMakeXmlSource, string, string)</a>
</div>
<div>
<a class="xref" href="Hi.Common.XmlUtils.XmlUtil.html#Hi_Common_XmlUtils_XmlUtil_SaveToByteArrayAsync_Hi_Common_XmlUtils_IMakeXmlSource_System_String_">XmlUtil.SaveToByteArrayAsync(IMakeXmlSource, string)</a>
</div>
<div>
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
</div>
<div>
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
</div>
<div>
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
</div>
</dd></dl>
<h2 class="section" id="constructors">Constructors
</h2>
<a id="Hi_Common_IndexSegment__ctor_" data-uid="Hi.Common.IndexSegment.#ctor*"></a>
<h3 id="Hi_Common_IndexSegment__ctor" data-uid="Hi.Common.IndexSegment.#ctor">
IndexSegment()
</h3>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="Hi.Common.IndexSegment.html">IndexSegment</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public IndexSegment()</code></pre>
</div>
<a id="Hi_Common_IndexSegment__ctor_" data-uid="Hi.Common.IndexSegment.#ctor*"></a>
<h3 id="Hi_Common_IndexSegment__ctor_Hi_Common_IndexSegment_" data-uid="Hi.Common.IndexSegment.#ctor(Hi.Common.IndexSegment)">
IndexSegment(IndexSegment)
</h3>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="Hi.Common.IndexSegment.html">IndexSegment</a> class by copying another instance.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public IndexSegment(IndexSegment src)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>src</code> <a class="xref" href="Hi.Common.IndexSegment.html">IndexSegment</a></dt>
<dd><p>The source index segment to copy from.</p>
</dd>
</dl>
<a id="Hi_Common_IndexSegment__ctor_" data-uid="Hi.Common.IndexSegment.#ctor*"></a>
<h3 id="Hi_Common_IndexSegment__ctor_System_Int32_System_Int32_" data-uid="Hi.Common.IndexSegment.#ctor(System.Int32,System.Int32)">
IndexSegment(int, int)
</h3>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="Hi.Common.IndexSegment.html">IndexSegment</a> class with the specified begin and end indices.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public IndexSegment(int begin, int end)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>begin</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>The beginning index (inclusive).</p>
</dd>
<dt><code>end</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>The ending index (exclusive).</p>
</dd>
</dl>
<a id="Hi_Common_IndexSegment__ctor_" data-uid="Hi.Common.IndexSegment.#ctor*"></a>
<h3 id="Hi_Common_IndexSegment__ctor_System_Xml_Linq_XElement_" data-uid="Hi.Common.IndexSegment.#ctor(System.Xml.Linq.XElement)">
IndexSegment(XElement)
</h3>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="Hi.Common.IndexSegment.html">IndexSegment</a> class from an XML element.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public IndexSegment(XElement src)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>src</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>The XML element containing the index segment data.</p>
</dd>
</dl>
<h2 class="section" id="fields">Fields
</h2>
<h3 id="Hi_Common_IndexSegment_XName" data-uid="Hi.Common.IndexSegment.XName">
XName
</h3>
<div class="markdown level1 summary"><p>The XML element name used for serialization.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static string XName</code></pre>
</div>
<h4 class="section">Field Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h3 id="Hi_Common_IndexSegment_begin" data-uid="Hi.Common.IndexSegment.begin">
begin
</h3>
<div class="markdown level1 summary"><p>Begin index. Inclusive.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int begin</code></pre>
</div>
<h4 class="section">Field Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<h3 id="Hi_Common_IndexSegment_end" data-uid="Hi.Common.IndexSegment.end">
end
</h3>
<div class="markdown level1 summary"><p>End index. Exclusive.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int end</code></pre>
</div>
<h4 class="section">Field Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="Hi_Common_IndexSegment_Begin_" data-uid="Hi.Common.IndexSegment.Begin*"></a>
<h3 id="Hi_Common_IndexSegment_Begin" data-uid="Hi.Common.IndexSegment.Begin">
Begin
</h3>
<div class="markdown level1 summary"><p>Gets or sets the beginning index of the segment (inclusive).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int Begin { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</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_IndexSegment_End_" data-uid="Hi.Common.IndexSegment.End*"></a>
<h3 id="Hi_Common_IndexSegment_End" data-uid="Hi.Common.IndexSegment.End">
End
</h3>
<div class="markdown level1 summary"><p>Gets or sets the ending index of the segment (exclusive).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int End { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</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_IndexSegment_Length_" data-uid="Hi.Common.IndexSegment.Length*"></a>
<h3 id="Hi_Common_IndexSegment_Length" data-uid="Hi.Common.IndexSegment.Length">
Length
</h3>
<div class="markdown level1 summary"><p>Gets the length of the segment (End - Begin).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int Length { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="methods">Methods
</h2>
<a id="Hi_Common_IndexSegment_Any_" data-uid="Hi.Common.IndexSegment.Any*"></a>
<h3 id="Hi_Common_IndexSegment_Any" data-uid="Hi.Common.IndexSegment.Any">
Any()
</h3>
<div class="markdown level1 summary"><p>Determines whether this index segment contains any indices.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool Any()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p>true if the segment contains any indices; otherwise, false.</p>
</dd>
</dl>
<a id="Hi_Common_IndexSegment_Contains_" data-uid="Hi.Common.IndexSegment.Contains*"></a>
<h3 id="Hi_Common_IndexSegment_Contains_System_Int32_" data-uid="Hi.Common.IndexSegment.Contains(System.Int32)">
Contains(int)
</h3>
<div class="markdown level1 summary"><p>Determines whether this index segment contains the specified index.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool Contains(int index)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>index</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>The index to check.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p>true if the index is within the segment; otherwise, false.</p>
</dd>
</dl>
<a id="Hi_Common_IndexSegment_Enumerate_" data-uid="Hi.Common.IndexSegment.Enumerate*"></a>
<h3 id="Hi_Common_IndexSegment_Enumerate" data-uid="Hi.Common.IndexSegment.Enumerate">
Enumerate()
</h3>
<div class="markdown level1 summary"><p>Enumerates all indices within this segment.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public IEnumerable&lt;int&gt; Enumerate()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>&gt;</dt>
<dd><p>An enumerable collection of all indices within the segment.</p>
</dd>
</dl>
<a id="Hi_Common_IndexSegment_Equals_" data-uid="Hi.Common.IndexSegment.Equals*"></a>
<h3 id="Hi_Common_IndexSegment_Equals_Hi_Common_IndexSegment_" data-uid="Hi.Common.IndexSegment.Equals(Hi.Common.IndexSegment)">
Equals(IndexSegment)
</h3>
<div class="markdown level1 summary"><p>Determines whether the specified index segment is equal to the current index segment.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool Equals(IndexSegment other)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>other</code> <a class="xref" href="Hi.Common.IndexSegment.html">IndexSegment</a></dt>
<dd><p>The index segment to compare with the current index segment.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p>true if the specified index segment is equal to the current index segment; otherwise, false.</p>
</dd>
</dl>
<a id="Hi_Common_IndexSegment_Equals_" data-uid="Hi.Common.IndexSegment.Equals*"></a>
<h3 id="Hi_Common_IndexSegment_Equals_System_Object_" data-uid="Hi.Common.IndexSegment.Equals(System.Object)">
Equals(object)
</h3>
<div class="markdown level1 summary"><p>Determines whether the specified object is equal to the current index segment.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public override bool Equals(object obj)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>obj</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></dt>
<dd><p>The object to compare with the current index segment.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p>true if the specified object is equal to the current index segment; otherwise, false.</p>
</dd>
</dl>
<a id="Hi_Common_IndexSegment_Expand_" data-uid="Hi.Common.IndexSegment.Expand*"></a>
<h3 id="Hi_Common_IndexSegment_Expand_System_Int32_" data-uid="Hi.Common.IndexSegment.Expand(System.Int32)">
Expand(int)
</h3>
<div class="markdown level1 summary"><p>Expands this index segment to include the specified value if needed.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Expand(int v)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>v</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>The value to include in the segment.</p>
</dd>
</dl>
<a id="Hi_Common_IndexSegment_GetHashCode_" data-uid="Hi.Common.IndexSegment.GetHashCode*"></a>
<h3 id="Hi_Common_IndexSegment_GetHashCode" data-uid="Hi.Common.IndexSegment.GetHashCode">
GetHashCode()
</h3>
<div class="markdown level1 summary"><p>Returns a hash code for this index segment.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public override int GetHashCode()</code></pre>
</div>
<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><p>A hash code for the current index segment.</p>
</dd>
</dl>
<a id="Hi_Common_IndexSegment_GetIndexSegment_" data-uid="Hi.Common.IndexSegment.GetIndexSegment*"></a>
<h3 id="Hi_Common_IndexSegment_GetIndexSegment__1_System_Collections_Generic_IList___0__System_Int32_System_Int32_System_Func___0_System_Nullable_System_Int32___" data-uid="Hi.Common.IndexSegment.GetIndexSegment``1(System.Collections.Generic.IList{``0},System.Int32,System.Int32,System.Func{``0,System.Nullable{System.Int32}})">
GetIndexSegment&lt;TData&gt;(IList&lt;TData&gt;, int, int, Func&lt;TData, int?&gt;)
</h3>
<div class="markdown level1 summary"><p>Gets an index segment from a list of data items based on the specified indices.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static IndexSegment GetIndexSegment&lt;TData&gt;(IList&lt;TData&gt; steps, int cacheStepIndex, int keyStepIndex, Func&lt;TData, int?&gt; dataToKeyIndexFunc)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>steps</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList</a>&lt;TData&gt;</dt>
<dd><p>The list of data items.</p>
</dd>
<dt><code>cacheStepIndex</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>The cache step index.</p>
</dd>
<dt><code>keyStepIndex</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>The key step index.</p>
</dd>
<dt><code>dataToKeyIndexFunc</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;TData, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>?&gt;</dt>
<dd><p>A function that extracts an index from a data item.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.Common.IndexSegment.html">IndexSegment</a></dt>
<dd><p>An index segment representing the range of indices.</p>
</dd>
</dl>
<h4 class="section">Type Parameters</h4>
<dl class="parameters">
<dt><code>TData</code></dt>
<dd><p>The type of data items.</p>
</dd>
</dl>
<a id="Hi_Common_IndexSegment_MakeXmlSource_" data-uid="Hi.Common.IndexSegment.MakeXmlSource*"></a>
<h3 id="Hi_Common_IndexSegment_MakeXmlSource_System_String_System_String_" data-uid="Hi.Common.IndexSegment.MakeXmlSource(System.String,System.String)">
MakeXmlSource(string, string)
</h3>
<div class="markdown level1 summary"><p>Creates an XML element representing this index segment.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public XElement MakeXmlSource(string baseDirectory, string relFile)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>baseDirectory</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The base directory for relative paths.</p>
</dd>
<dt><code>relFile</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The relative file path.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>An XML element representing this index segment.</p>
</dd>
</dl>
<a id="Hi_Common_IndexSegment_ToString_" data-uid="Hi.Common.IndexSegment.ToString*"></a>
<h3 id="Hi_Common_IndexSegment_ToString" data-uid="Hi.Common.IndexSegment.ToString">
ToString()
</h3>
<div class="markdown level1 summary"><p>Returns a string representation of this index segment.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public override string ToString()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>A string representation of the current index segment.</p>
</dd>
</dl>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>