# C1.DataCollection.C1VirtualDataCollection-1.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_DataCollection_C1VirtualDataCollection_1__ctor_" data-uid="C1.DataCollection.C1VirtualDataCollection`1.#ctor*">C1VirtualDataCollection Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_DataCollection_C1VirtualDataCollection_1__ctor_" data-uid="C1.DataCollection.C1VirtualDataCollection`1.#ctor*"></a>
<h4 id="C1_DataCollection_C1VirtualDataCollection_1__ctor_System_Int32_System_Int32_System_Nullable_System_TimeSpan__" data-uid="C1.DataCollection.C1VirtualDataCollection`1.#ctor(System.Int32,System.Int32,System.Nullable{System.TimeSpan})">C1VirtualDataCollection(int, int, TimeSpan?)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.DataCollection.C1VirtualDataCollection-1.html">C1VirtualDataCollection&lt;T&gt;</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public C1VirtualDataCollection(int maxParallelRequests = 4, int maxActiveRequests = 4, TimeSpan? requestDelay = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(Optional maxParallelRequests As Integer = 4, Optional maxActiveRequests As Integer = 4, Optional requestDelay As TimeSpan? = Nothing)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">maxParallelRequests</span></td>
      <td><p>The maximum number of pages that will be requested concurrently. If 1 is specified, the pages will be fetched one after the other. Avoid setting a big number to prevent saturating the server with too many requests.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">maxActiveRequests</span></td>
      <td><p>The maximum number of pages that will be executing, or waiting. When this number is surpassed the oldest requested pages will be cancelled. The value of this parameter must be greater than <code class="paramref">maxParallelRequests</code>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.timespan">TimeSpan</a>?</td>
      <td><span class="parametername">requestDelay</span></td>
      <td><p>The delay before requesting a page. When this parameter is greater than zero, it helps avoid bursts of page requests, typically caused by scrolling down operations.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
