# C1.Schedule.BaseStorage-2

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Schedule_BaseStorage_2" data-uid="C1.Schedule.BaseStorage`2" class="text-break">BaseStorage&lt;T, TMappingCollection&gt; Class
</h1>
  <div class="markdown level0 summary"><p>The <a class="xref" href="C1.Schedule.BaseStorage-2.html">BaseStorage&lt;T, TMappingCollection&gt;</a> is the base generic component
for all storages in C1Schedule object model.
Represents a storage of objects derived from <a class="xref" href="C1.Schedule.BasePersistableObject.html">BasePersistableObject</a>.
This component implements methods of operations over the collections of objects.
It allows the collection to be populated programmatically
or automatically by retrieving data from the data source which
is specified by the DataSource and DataMember properties.
It allows mapping of data source fields to the object properties.</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"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.marshalbyrefobject">MarshalByRefObject</a></div>
    <div class="level2"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.component">Component</a></div>
    <div class="level3"><a class="xref" href="C1.Schedule.C1BindingSource.html">C1BindingSource</a></div>
    <div class="level4"><span class="xref">BaseStorage&lt;T, TMappingCollection&gt;</span></div>
      <div class="level5"><a class="xref" href="C1.Schedule.AppointmentStorage.html">AppointmentStorage</a></div>
      <div class="level5"><a class="xref" href="C1.Schedule.CategoryStorage.html">CategoryStorage</a></div>
      <div class="level5"><a class="xref" href="C1.Schedule.ContactStorage.html">ContactStorage</a></div>
      <div class="level5"><a class="xref" href="C1.Schedule.LabelStorage.html">LabelStorage</a></div>
      <div class="level5"><a class="xref" href="C1.Schedule.ResourceStorage.html">ResourceStorage</a></div>
      <div class="level5"><a class="xref" href="C1.Schedule.StatusStorage.html">StatusStorage</a></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.icomponent">IComponent</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.ibindinglistview">IBindingListView</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.ibindinglist">IBindingList</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ilist">IList</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.icollection">ICollection</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.itypedlist">ITypedList</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.isupportinitializenotification">ISupportInitializeNotification</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.isupportinitialize">ISupportInitialize</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.isite">ISite</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iserviceprovider">IServiceProvider</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Schedule.html">C1.Schedule</a></h6>
  <h6><strong>Assembly</strong>: C1.ScheduleCore.dll</h6>
  <h5 id="C1_Schedule_BaseStorage_2_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[ComplexBindingProperties(&quot;DataSource&quot;, &quot;DataMember&quot;)]
public class BaseStorage&lt;T, TMappingCollection&gt; : C1BindingSource, IComponent, IDisposable, IBindingListView, IBindingList, IList, ICollection, IEnumerable, ITypedList, ISupportInitializeNotification, ISupportInitialize, ISite, IServiceProvider where T : BasePersistableObject, new() where TMappingCollection : MappingCollectionBase&lt;T&gt;, new()</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">&lt;ComplexBindingProperties(&quot;DataSource&quot;, &quot;DataMember&quot;)&gt;
Public Class BaseStorage(Of T As {BasePersistableObject, New}, TMappingCollection As {MappingCollectionBase(Of T), New})
    Inherits C1BindingSource
    Implements IComponent, IDisposable, IBindingListView, IBindingList, IList, ICollection, IEnumerable, ITypedList, ISupportInitializeNotification, ISupportInitialize, ISite, IServiceProvider</code></pre>
  </div>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">T</span></td>
        <td><p>The type of the objects which will be stored in the storage.
It should be derived from the <a class="xref" href="C1.Schedule.BasePersistableObject.html">BasePersistableObject</a> class
and have the default parameter-less constructor.</p>
</td>
      </tr>
      <tr>
        <td><span class="parametername">TMappingCollection</span></td>
        <td><p>The type of the collection which
will be used for mapping. It should be derived from
the <a class="xref" href="C1.Schedule.MappingCollectionBase-1.html">MappingCollectionBase&lt;T&gt;</a> class
and have the default parameter-less constructor.</p>
</td>
      </tr>
    </tbody>
  </table>
  <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_Schedule_BaseStorage_2__ctor_C1_Schedule_StorageComponent_" data-uid="C1.Schedule.BaseStorage`2.#ctor(C1.Schedule.StorageComponent)">
          <a class="xref" href="C1.Schedule.BaseStorage-2.-ctor.html#C1_Schedule_BaseStorage_2__ctor_C1_Schedule_StorageComponent_">BaseStorage(StorageComponent)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes the new instance of the <a class="xref" href="C1.Schedule.BaseStorage-2.html">BaseStorage&lt;T, TMappingCollection&gt;</a> component.</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_Schedule_BaseStorage_2_BoundMode" data-uid="C1.Schedule.BaseStorage`2.BoundMode">
          <a class="xref" href="C1.Schedule.BaseStorage-2.BoundMode.html#C1_Schedule_BaseStorage_2_BoundMode">BoundMode</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a value indicating if the collection is bound to data.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Schedule_BaseStorage_2_DataKeyNamesInternal" data-uid="C1.Schedule.BaseStorage`2.DataKeyNamesInternal">
          <a class="xref" href="C1.Schedule.BaseStorage-2.DataKeyNamesInternal.html#C1_Schedule_BaseStorage_2_DataKeyNamesInternal">DataKeyNamesInternal</a>
        </td>
        <td class="markdown level1 summary"><p>This property is for internal use only.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Schedule_BaseStorage_2_Mappings" data-uid="C1.Schedule.BaseStorage`2.Mappings">
          <a class="xref" href="C1.Schedule.BaseStorage-2.Mappings.html#C1_Schedule_BaseStorage_2_Mappings">Mappings</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the <a class="xref" href="C1.Schedule.MappingCollectionBase-1.html">MappingCollectionBase&lt;T&gt;</a> derived object
that allows the properties of objects maintained by the current collection
to be bound to the appropriate fields in the data source.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Schedule_BaseStorage_2_Objects" data-uid="C1.Schedule.BaseStorage`2.Objects">
          <a class="xref" href="C1.Schedule.BaseStorage-2.Objects.html#C1_Schedule_BaseStorage_2_Objects">Objects</a>
        </td>
        <td class="markdown level1 summary"><p>For internal use only.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Schedule_BaseStorage_2_ScheduleStorage" data-uid="C1.Schedule.BaseStorage`2.ScheduleStorage">
          <a class="xref" href="C1.Schedule.BaseStorage-2.ScheduleStorage.html#C1_Schedule_BaseStorage_2_ScheduleStorage">ScheduleStorage</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the reference to the owning <a class="xref" href="C1.Schedule.C1ScheduleStorage.html">C1ScheduleStorage</a> component.</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_Schedule_BaseStorage_2_CommitItemChanges__0_" data-uid="C1.Schedule.BaseStorage`2.CommitItemChanges(`0)">
          <a class="xref" href="C1.Schedule.BaseStorage-2.CommitItemChanges.html#C1_Schedule_BaseStorage_2_CommitItemChanges__0_">CommitItemChanges(T)</a>
        </td>
        <td class="markdown level1 summary"><p>Commits all changes in the data item.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Schedule_BaseStorage_2_IsSynchronizable_C1_Schedule_BasePersistableObject_" data-uid="C1.Schedule.BaseStorage`2.IsSynchronizable(C1.Schedule.BasePersistableObject)">
          <a class="xref" href="C1.Schedule.BaseStorage-2.IsSynchronizable.html#C1_Schedule_BaseStorage_2_IsSynchronizable_C1_Schedule_BasePersistableObject_">IsSynchronizable(BasePersistableObject)</a>
        </td>
        <td class="markdown level1 summary"><p>Indicates whether the specified collection item should be synchronized.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Schedule_BaseStorage_2_OnDataSourceItemSynchronized_C1_Schedule_ItemSynchronizedEventArgs_" data-uid="C1.Schedule.BaseStorage`2.OnDataSourceItemSynchronized(C1.Schedule.ItemSynchronizedEventArgs)">
          <a class="xref" href="C1.Schedule.BaseStorage-2.OnDataSourceItemSynchronized.html#C1_Schedule_BaseStorage_2_OnDataSourceItemSynchronized_C1_Schedule_ItemSynchronizedEventArgs_">OnDataSourceItemSynchronized(ItemSynchronizedEventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Raises the <a class="xref" href="C1.Schedule.BaseStorage-2.DataSourceItemSynchronized.html">DataSourceItemSynchronized</a> event.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Schedule_BaseStorage_2_OnListChanged_System_ComponentModel_ListChangedEventArgs_" data-uid="C1.Schedule.BaseStorage`2.OnListChanged(System.ComponentModel.ListChangedEventArgs)">
          <a class="xref" href="C1.Schedule.BaseStorage-2.OnListChanged.html#C1_Schedule_BaseStorage_2_OnListChanged_System_ComponentModel_ListChangedEventArgs_">OnListChanged(ListChangedEventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Translates changes in the internal list to the Objects collection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Schedule_BaseStorage_2_RefreshData" data-uid="C1.Schedule.BaseStorage`2.RefreshData">
          <a class="xref" href="C1.Schedule.BaseStorage-2.RefreshData.html#C1_Schedule_BaseStorage_2_RefreshData">RefreshData()</a>
        </td>
        <td class="markdown level1 summary"><p>Call this method each time after changing your data source
if it doesn't implement IBindingList interface.
Or use BaseStorage{T, TMappingCollection}.Add
and BaseStorage{T, TMappingCollection}.Remove
instead of corresponding methods of your data source class.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Schedule_BaseStorage_2_Remove_System_Object_" data-uid="C1.Schedule.BaseStorage`2.Remove(System.Object)">
          <a class="xref" href="C1.Schedule.BaseStorage-2.Remove.html#C1_Schedule_BaseStorage_2_Remove_System_Object_">Remove(object)</a>
        </td>
        <td class="markdown level1 summary"><p>Removes object from the Objects collection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Schedule_BaseStorage_2_ShouldSerializeMappings" data-uid="C1.Schedule.BaseStorage`2.ShouldSerializeMappings">
          <a class="xref" href="C1.Schedule.BaseStorage-2.ShouldSerializeMappings.html#C1_Schedule_BaseStorage_2_ShouldSerializeMappings">ShouldSerializeMappings()</a>
        </td>
        <td class="markdown level1 summary"></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_Schedule_BaseStorage_2_DataSourceItemSynchronized" data-uid="C1.Schedule.BaseStorage`2.DataSourceItemSynchronized">
          <a class="xref" href="C1.Schedule.BaseStorage-2.DataSourceItemSynchronized.html">DataSourceItemSynchronized</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when changes made to the source collection has been fully reflected in the storage underlying data source.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
