# C1.Web.Mvc.Fluent.ListItemFactory-2.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Web_Mvc_Fluent_ListItemFactory_2__ctor_" data-uid="C1.Web.Mvc.Fluent.ListItemFactory`2.#ctor*">ListItemFactory Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Web_Mvc_Fluent_ListItemFactory_2__ctor_" data-uid="C1.Web.Mvc.Fluent.ListItemFactory`2.#ctor*"></a>
<h4 id="C1_Web_Mvc_Fluent_ListItemFactory_2__ctor_System_Collections_Generic_IList__0__System_Func__0__1__" data-uid="C1.Web.Mvc.Fluent.ListItemFactory`2.#ctor(System.Collections.Generic.IList{`0},System.Func{`0,`1})">ListItemFactory(IList&lt;TItem&gt;, Func&lt;TItem, TItemBuilder&gt;)</h4>
<div class="markdown level1 summary"><p>Initializes an instance of the <a class="xref" href="C1.Web.Mvc.Fluent.ListItemFactory-2.html">ListItemFactory&lt;TItem, TItemBuilder&gt;</a> class
by using the specified collection.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public ListItemFactory(IList&lt;TItem&gt; list, Func&lt;TItem, TItemBuilder&gt; createItemBuilder)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(list As IList(Of TItem), createItemBuilder As Func(Of TItem, TItemBuilder))</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.collections.generic.ilist-1">IList</a>&lt;TItem&gt;</td>
      <td><span class="parametername">list</span></td>
      <td><p>The specified collection.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;TItem, TItemBuilder&gt;</td>
      <td><span class="parametername">createItemBuilder</span></td>
      <td><p>The function for creating item builder.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Web_Mvc_Fluent_ListItemFactory_2__ctor_" data-uid="C1.Web.Mvc.Fluent.ListItemFactory`2.#ctor*"></a>
<h4 id="C1_Web_Mvc_Fluent_ListItemFactory_2__ctor_System_Collections_Generic_IList__0__System_Func__0__System_Func__0__1__" data-uid="C1.Web.Mvc.Fluent.ListItemFactory`2.#ctor(System.Collections.Generic.IList{`0},System.Func{`0},System.Func{`0,`1})">ListItemFactory(IList&lt;TItem&gt;, Func&lt;TItem&gt;, Func&lt;TItem, TItemBuilder&gt;)</h4>
<div class="markdown level1 summary"><p>Initializes an instance of the <a class="xref" href="C1.Web.Mvc.Fluent.ListItemFactory-2.html">ListItemFactory&lt;TItem, TItemBuilder&gt;</a> class
by using the specified collection.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public ListItemFactory(IList&lt;TItem&gt; list, Func&lt;TItem&gt; createItem, Func&lt;TItem, TItemBuilder&gt; createItemBuilder)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(list As IList(Of TItem), createItem As Func(Of TItem), createItemBuilder As Func(Of TItem, TItemBuilder))</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.collections.generic.ilist-1">IList</a>&lt;TItem&gt;</td>
      <td><span class="parametername">list</span></td>
      <td><p>The specified collection.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-1">Func</a>&lt;TItem&gt;</td>
      <td><span class="parametername">createItem</span></td>
      <td><p>The function to create an item.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;TItem, TItemBuilder&gt;</td>
      <td><span class="parametername">createItemBuilder</span></td>
      <td><p>The builder to set an item.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
