# C1.Document.C1TextSearchManager

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Document_C1TextSearchManager" data-uid="C1.Document.C1TextSearchManager" class="text-break">C1TextSearchManager Class
</h1>
  <div class="markdown level0 summary"><p>Provides functionality to search text in the document managed by the <a class="xref" href="C1.Document.C1DocumentSource.html">C1DocumentSource</a>.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">C1TextSearchManager</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Document.html">C1.Document</a></h6>
  <h6><strong>Assembly</strong>: C1.Document.dll</h6>
  <h5 id="C1_Document_C1TextSearchManager_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class C1TextSearchManager : IDisposable</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class C1TextSearchManager
    Implements IDisposable</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Document_C1TextSearchManager__ctor_C1_Document_C1DocumentSource_" data-uid="C1.Document.C1TextSearchManager.#ctor(C1.Document.C1DocumentSource)">
          <a class="xref" href="C1.Document.C1TextSearchManager.-ctor.html#C1_Document_C1TextSearchManager__ctor_C1_Document_C1DocumentSource_">C1TextSearchManager(C1DocumentSource)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Document.C1TextSearchManager.html">C1TextSearchManager</a>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Document_C1TextSearchManager_ActiveFoundPosition" data-uid="C1.Document.C1TextSearchManager.ActiveFoundPosition">
          <a class="xref" href="C1.Document.C1TextSearchManager.ActiveFoundPosition.html#C1_Document_C1TextSearchManager_ActiveFoundPosition">ActiveFoundPosition</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the active found position, this position has different highlighting attrs.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_DocumentSource" data-uid="C1.Document.C1TextSearchManager.DocumentSource">
          <a class="xref" href="C1.Document.C1TextSearchManager.DocumentSource.html#C1_Document_C1TextSearchManager_DocumentSource">DocumentSource</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the <a class="xref" href="C1.Document.C1DocumentSource.html">C1DocumentSource</a> where this <a class="xref" href="C1.Document.C1TextSearchManager.html">C1TextSearchManager</a> searches a text.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_FoundPositions" data-uid="C1.Document.C1TextSearchManager.FoundPositions">
          <a class="xref" href="C1.Document.C1TextSearchManager.FoundPositions.html#C1_Document_C1TextSearchManager_FoundPositions">FoundPositions</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the list of <a class="xref" href="C1.Document.C1FoundPosition.html">C1FoundPosition</a> objects defining found text positions.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_Params" data-uid="C1.Document.C1TextSearchManager.Params">
          <a class="xref" href="C1.Document.C1TextSearchManager.Params.html#C1_Document_C1TextSearchManager_Params">Params</a>
        </td>
        <td class="markdown level1 summary"><p>Search parameters: text, etc. Initialized in the FindStartXXX() method.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_Scope" data-uid="C1.Document.C1TextSearchManager.Scope">
          <a class="xref" href="C1.Document.C1TextSearchManager.Scope.html#C1_Document_C1TextSearchManager_Scope">Scope</a>
        </td>
        <td class="markdown level1 summary"><p>Specifies the scope in <a class="xref" href="C1.Document.C1Document.html">C1Document</a> where to search a text.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Document_C1TextSearchManager_CancelAsync" data-uid="C1.Document.C1TextSearchManager.CancelAsync">
          <a class="xref" href="C1.Document.C1TextSearchManager.CancelAsync.html#C1_Document_C1TextSearchManager_CancelAsync">CancelAsync()</a>
        </td>
        <td class="markdown level1 summary"><p>Cancels current async action and waits while action will be actually cancelled.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_Dispose" data-uid="C1.Document.C1TextSearchManager.Dispose">
          <a class="xref" href="C1.Document.C1TextSearchManager.Dispose.html#C1_Document_C1TextSearchManager_Dispose">Dispose()</a>
        </td>
        <td class="markdown level1 summary"><p>Releases all resources used by the <a class="xref" href="C1.Document.C1TextSearchManager.html">C1TextSearchManager</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_Dispose_System_Boolean_" data-uid="C1.Document.C1TextSearchManager.Dispose(System.Boolean)">
          <a class="xref" href="C1.Document.C1TextSearchManager.Dispose.html#C1_Document_C1TextSearchManager_Dispose_System_Boolean_">Dispose(bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Releases the unmanaged resources used by the <a class="xref" href="C1.Document.C1TextSearchManager.html">C1TextSearchManager</a> and optionally releases the managed resources.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_Finalize" data-uid="C1.Document.C1TextSearchManager.Finalize">
          <a class="xref" href="C1.Document.C1TextSearchManager.Finalize.html#C1_Document_C1TextSearchManager_Finalize">~C1TextSearchManager()</a>
        </td>
        <td class="markdown level1 summary"><p>Releases the unmanaged resources.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_FindNext_C1_Document_C1FoundPosition_" data-uid="C1.Document.C1TextSearchManager.FindNext(C1.Document.C1FoundPosition)">
          <a class="xref" href="C1.Document.C1TextSearchManager.FindNext.html#C1_Document_C1TextSearchManager_FindNext_C1_Document_C1FoundPosition_">FindNext(C1FoundPosition)</a>
        </td>
        <td class="markdown level1 summary"><p>Finds the next occurrence of a text in the document.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_FindNextAsync_C1_Document_C1FoundPosition_System_Boolean_" data-uid="C1.Document.C1TextSearchManager.FindNextAsync(C1.Document.C1FoundPosition,System.Boolean)">
          <a class="xref" href="C1.Document.C1TextSearchManager.FindNextAsync.html#C1_Document_C1TextSearchManager_FindNextAsync_C1_Document_C1FoundPosition_System_Boolean_">FindNextAsync(C1FoundPosition, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Non-blocking (asynchronous) version of the <a class="xref" href="C1.Document.C1TextSearchManager.FindNext.html#C1_Document_C1TextSearchManager_FindNext_C1_Document_C1FoundPosition_">FindNext(C1FoundPosition)</a> method.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_FindNextAsyncEx_C1_Document_C1FoundPosition_System_Boolean_" data-uid="C1.Document.C1TextSearchManager.FindNextAsyncEx(C1.Document.C1FoundPosition,System.Boolean)">
          <a class="xref" href="C1.Document.C1TextSearchManager.FindNextAsyncEx.html#C1_Document_C1TextSearchManager_FindNextAsyncEx_C1_Document_C1FoundPosition_System_Boolean_">FindNextAsyncEx(C1FoundPosition, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Non-blocking (asynchronous) version of the <a class="xref" href="C1.Document.C1TextSearchManager.FindNext.html#C1_Document_C1TextSearchManager_FindNext_C1_Document_C1FoundPosition_">FindNext(C1FoundPosition)</a> method.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_FindPrevious_C1_Document_C1FoundPosition_" data-uid="C1.Document.C1TextSearchManager.FindPrevious(C1.Document.C1FoundPosition)">
          <a class="xref" href="C1.Document.C1TextSearchManager.FindPrevious.html#C1_Document_C1TextSearchManager_FindPrevious_C1_Document_C1FoundPosition_">FindPrevious(C1FoundPosition)</a>
        </td>
        <td class="markdown level1 summary"><p>Finds the previous occurrence of a text in the document.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_FindPreviousAsync_C1_Document_C1FoundPosition_System_Boolean_" data-uid="C1.Document.C1TextSearchManager.FindPreviousAsync(C1.Document.C1FoundPosition,System.Boolean)">
          <a class="xref" href="C1.Document.C1TextSearchManager.FindPreviousAsync.html#C1_Document_C1TextSearchManager_FindPreviousAsync_C1_Document_C1FoundPosition_System_Boolean_">FindPreviousAsync(C1FoundPosition, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Non-blocking (asynchronous) version of the <a class="xref" href="C1.Document.C1TextSearchManager.FindPrevious.html#C1_Document_C1TextSearchManager_FindPrevious_C1_Document_C1FoundPosition_">FindPrevious(C1FoundPosition)</a> method.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_FindPreviousAsyncEx_C1_Document_C1FoundPosition_System_Boolean_" data-uid="C1.Document.C1TextSearchManager.FindPreviousAsyncEx(C1.Document.C1FoundPosition,System.Boolean)">
          <a class="xref" href="C1.Document.C1TextSearchManager.FindPreviousAsyncEx.html#C1_Document_C1TextSearchManager_FindPreviousAsyncEx_C1_Document_C1FoundPosition_System_Boolean_">FindPreviousAsyncEx(C1FoundPosition, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Non-blocking (asynchronous) version of the <a class="xref" href="C1.Document.C1TextSearchManager.FindPrevious.html#C1_Document_C1TextSearchManager_FindPrevious_C1_Document_C1FoundPosition_">FindPrevious(C1FoundPosition)</a> method.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_FindStart_System_Int32_C1_Document_SearchScope_C1_Document_C1FindTextParams_" data-uid="C1.Document.C1TextSearchManager.FindStart(System.Int32,C1.Document.SearchScope,C1.Document.C1FindTextParams)">
          <a class="xref" href="C1.Document.C1TextSearchManager.FindStart.html#C1_Document_C1TextSearchManager_FindStart_System_Int32_C1_Document_SearchScope_C1_Document_C1FindTextParams_">FindStart(int, SearchScope, C1FindTextParams)</a>
        </td>
        <td class="markdown level1 summary"><p>Finds the first occurrence of a text in the document.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_FindStart_System_Int32_System_Boolean_C1_Document_C1FindTextParams_" data-uid="C1.Document.C1TextSearchManager.FindStart(System.Int32,System.Boolean,C1.Document.C1FindTextParams)">
          <a class="xref" href="C1.Document.C1TextSearchManager.FindStart.html#C1_Document_C1TextSearchManager_FindStart_System_Int32_System_Boolean_C1_Document_C1FindTextParams_">FindStart(int, bool, C1FindTextParams)</a>
        </td>
        <td class="markdown level1 summary"><p>Finds the first occurrence of a text in the document.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_FindStartAsync_System_Int32_C1_Document_SearchScope_C1_Document_C1FindTextParams_System_Boolean_" data-uid="C1.Document.C1TextSearchManager.FindStartAsync(System.Int32,C1.Document.SearchScope,C1.Document.C1FindTextParams,System.Boolean)">
          <a class="xref" href="C1.Document.C1TextSearchManager.FindStartAsync.html#C1_Document_C1TextSearchManager_FindStartAsync_System_Int32_C1_Document_SearchScope_C1_Document_C1FindTextParams_System_Boolean_">FindStartAsync(int, SearchScope, C1FindTextParams, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Non-blocking (asynchronous) version of the <a class="xref" href="C1.Document.C1TextSearchManager.FindStart.html#C1_Document_C1TextSearchManager_FindStart_System_Int32_C1_Document_SearchScope_C1_Document_C1FindTextParams_">FindStart(int, SearchScope, C1FindTextParams)</a> method.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_FindStartAsync_System_Int32_System_Boolean_C1_Document_C1FindTextParams_System_Boolean_" data-uid="C1.Document.C1TextSearchManager.FindStartAsync(System.Int32,System.Boolean,C1.Document.C1FindTextParams,System.Boolean)">
          <a class="xref" href="C1.Document.C1TextSearchManager.FindStartAsync.html#C1_Document_C1TextSearchManager_FindStartAsync_System_Int32_System_Boolean_C1_Document_C1FindTextParams_System_Boolean_">FindStartAsync(int, bool, C1FindTextParams, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Non-blocking (asynchronous) version of the <a class="xref" href="C1.Document.C1TextSearchManager.FindStart.html#C1_Document_C1TextSearchManager_FindStart_System_Int32_System_Boolean_C1_Document_C1FindTextParams_">FindStart(int, bool, C1FindTextParams)</a> method.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_FindStartAsyncEx_System_Int32_C1_Document_SearchScope_C1_Document_C1FindTextParams_System_Boolean_" data-uid="C1.Document.C1TextSearchManager.FindStartAsyncEx(System.Int32,C1.Document.SearchScope,C1.Document.C1FindTextParams,System.Boolean)">
          <a class="xref" href="C1.Document.C1TextSearchManager.FindStartAsyncEx.html#C1_Document_C1TextSearchManager_FindStartAsyncEx_System_Int32_C1_Document_SearchScope_C1_Document_C1FindTextParams_System_Boolean_">FindStartAsyncEx(int, SearchScope, C1FindTextParams, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Non-blocking (asynchronous) version of the <a class="xref" href="C1.Document.C1TextSearchManager.FindStart.html#C1_Document_C1TextSearchManager_FindStart_System_Int32_C1_Document_SearchScope_C1_Document_C1FindTextParams_">FindStart(int, SearchScope, C1FindTextParams)</a> method.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_FindStartAsyncEx_System_Int32_System_Boolean_C1_Document_C1FindTextParams_System_Boolean_" data-uid="C1.Document.C1TextSearchManager.FindStartAsyncEx(System.Int32,System.Boolean,C1.Document.C1FindTextParams,System.Boolean)">
          <a class="xref" href="C1.Document.C1TextSearchManager.FindStartAsyncEx.html#C1_Document_C1TextSearchManager_FindStartAsyncEx_System_Int32_System_Boolean_C1_Document_C1FindTextParams_System_Boolean_">FindStartAsyncEx(int, bool, C1FindTextParams, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Non-blocking (asynchronous) version of the <a class="xref" href="C1.Document.C1TextSearchManager.FindStart.html#C1_Document_C1TextSearchManager_FindStart_System_Int32_System_Boolean_C1_Document_C1FindTextParams_">FindStart(int, bool, C1FindTextParams)</a> method.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_GetFragmentHighligh_System_Collections_Generic_IList_C1_Document_C1FragmentHighlight__C1_Document_RenderFragment_C1_Document_C1HighlightAttrs_C1_Document_C1HighlightAttrs_" data-uid="C1.Document.C1TextSearchManager.GetFragmentHighligh(System.Collections.Generic.IList{C1.Document.C1FragmentHighlight},C1.Document.RenderFragment,C1.Document.C1HighlightAttrs,C1.Document.C1HighlightAttrs)">
          <a class="xref" href="C1.Document.C1TextSearchManager.GetFragmentHighligh.html#C1_Document_C1TextSearchManager_GetFragmentHighligh_System_Collections_Generic_IList_C1_Document_C1FragmentHighlight__C1_Document_RenderFragment_C1_Document_C1HighlightAttrs_C1_Document_C1HighlightAttrs_">GetFragmentHighligh(IList&lt;C1FragmentHighlight&gt;, RenderFragment, C1HighlightAttrs, C1HighlightAttrs)</a>
        </td>
        <td class="markdown level1 summary"><p>Fills <code class="paramref">highlight</code> list for specified <span class="xref">C1.Document.RenderFragment</span>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_HasFoundPositions" data-uid="C1.Document.C1TextSearchManager.HasFoundPositions">
          <a class="xref" href="C1.Document.C1TextSearchManager.HasFoundPositions.html#C1_Document_C1TextSearchManager_HasFoundPositions">HasFoundPositions()</a>
        </td>
        <td class="markdown level1 summary"><p>Checks whether <a class="xref" href="C1.Document.C1TextSearchManager.FoundPositions.html#C1_Document_C1TextSearchManager_FoundPositions">FoundPositions</a> of this <a class="xref" href="C1.Document.C1TextSearchManager.html">C1TextSearchManager</a> is not empty.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_IsSearching" data-uid="C1.Document.C1TextSearchManager.IsSearching">
          <a class="xref" href="C1.Document.C1TextSearchManager.IsSearching.html#C1_Document_C1TextSearchManager_IsSearching">IsSearching()</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a value indicating if search is currently executing.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_OnFindActionCompleted_C1_Document_C1FindTextAction_C1_Document_C1FoundPosition_System_Exception_" data-uid="C1.Document.C1TextSearchManager.OnFindActionCompleted(C1.Document.C1FindTextAction,C1.Document.C1FoundPosition,System.Exception)">
          <a class="xref" href="C1.Document.C1TextSearchManager.OnFindActionCompleted.html#C1_Document_C1TextSearchManager_OnFindActionCompleted_C1_Document_C1FindTextAction_C1_Document_C1FoundPosition_System_Exception_">OnFindActionCompleted(C1FindTextAction, C1FoundPosition, Exception)</a>
        </td>
        <td class="markdown level1 summary"><p>Raises the <a class="xref" href="C1.Document.C1TextSearchManager.FindActionCompleted.html">FindActionCompleted</a> event.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_OnFoundPositionsChanged" data-uid="C1.Document.C1TextSearchManager.OnFoundPositionsChanged">
          <a class="xref" href="C1.Document.C1TextSearchManager.OnFoundPositionsChanged.html#C1_Document_C1TextSearchManager_OnFoundPositionsChanged">OnFoundPositionsChanged()</a>
        </td>
        <td class="markdown level1 summary"><p>Raises the <a class="xref" href="C1.Document.C1TextSearchManager.FoundPositionsChanged.html">FoundPositionsChanged</a> event.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_OnLongOperation_System_Double_System_Boolean_" data-uid="C1.Document.C1TextSearchManager.OnLongOperation(System.Double,System.Boolean)">
          <a class="xref" href="C1.Document.C1TextSearchManager.OnLongOperation.html#C1_Document_C1TextSearchManager_OnLongOperation_System_Double_System_Boolean_">OnLongOperation(double, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Raises the <a class="xref" href="C1.Document.C1TextSearchManager.LongOperation.html">LongOperation</a> event.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_Reset" data-uid="C1.Document.C1TextSearchManager.Reset">
          <a class="xref" href="C1.Document.C1TextSearchManager.Reset.html#C1_Document_C1TextSearchManager_Reset">Reset()</a>
        </td>
        <td class="markdown level1 summary"><p>Resets text search results.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="events">Events
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Document_C1TextSearchManager_FindActionCompleted" data-uid="C1.Document.C1TextSearchManager.FindActionCompleted">
          <a class="xref" href="C1.Document.C1TextSearchManager.FindActionCompleted.html">FindActionCompleted</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when async find action completed.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_FoundPositionsChanged" data-uid="C1.Document.C1TextSearchManager.FoundPositionsChanged">
          <a class="xref" href="C1.Document.C1TextSearchManager.FoundPositionsChanged.html">FoundPositionsChanged</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when the <a class="xref" href="C1.Document.C1TextSearchManager.FoundPositions.html#C1_Document_C1TextSearchManager_FoundPositions">FoundPositions</a> list is changed.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1TextSearchManager_LongOperation" data-uid="C1.Document.C1TextSearchManager.LongOperation">
          <a class="xref" href="C1.Document.C1TextSearchManager.LongOperation.html">LongOperation</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs periodically during operations.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
