Class RecordsListBase
The class that maintains the collection of records as a list, by implementing the methods declared in the IRecordEntryList.
Implements
Namespace: Syncfusion.Data
Assembly: Syncfusion.Data.WPF.dll
Syntax
public class RecordsListBase : Object, IRecordsEntryList, IList<RecordEntry>, ICollection<RecordEntry>, IEnumerable<RecordEntry>, IEnumerable, INotifyCollectionChanged, IDisposable
Constructors
RecordsListBase()
Initializes a new instance of the RecordsListBase class.
Declaration
public RecordsListBase()
Fields
indicesList
Gets the collection of records in the collection view in the ListIndexer<T>
Declaration
protected ListIndexer<RecordEntry> indicesList
Field Value
Type |
---|
ListIndexer<RecordEntry> |
internalList
Gets the collection of records in the collection view.
Declaration
protected ObservableCollection<RecordEntry> internalList
Field Value
Type |
---|
System.Collections.ObjectModel.ObservableCollection<RecordEntry> |
Properties
Count
Gets the number of elements contained in the System.Collections.Generic.ICollection<>.
Declaration
public virtual int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The number of elements contained in the System.Collections.Generic.ICollection<>. |
IsInSuspend
Gets a boolean value indicating whether the view updates is suspended.
Declaration
public virtual bool IsInSuspend { get; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether the view updates is suspended. |
IsReadOnly
Gets a value indicating whether the System.Collections.Generic.ICollection<> is read-only.
Declaration
public virtual bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System.Boolean | True if the System.Collections.Generic.ICollection<> is read-only; otherwise, false. |
Item[Int32]
Gets the record entry object for the data in the given index.
Declaration
public virtual RecordEntry this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index at which the record entry is to be obtained. |
Property Value
Type | Description |
---|---|
RecordEntry | The record entry object for the data in the given index. |
Methods
Add(RecordEntry)
Adds an item to the System.Collections.Generic.ICollection<>.
Declaration
public virtual void Add(RecordEntry item)
Parameters
Type | Name | Description |
---|---|---|
RecordEntry | item | The object to add to the System.Collections.Generic.ICollection<>. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | The System.Collections.Generic.ICollection<> is read-only. |
Add(Object)
Adds the specified data to the record collection.
Declaration
public virtual void Add(object item)
Parameters
Type | Name | Description |
---|---|---|
System.Object | item | The data to be added to the record collection. |
Clear()
Clears all the items in the record collection.
Declaration
public virtual void Clear()
Contains(RecordEntry)
Determines whether the System.Collections.Generic.ICollection<> contains the given item.
Declaration
public virtual bool Contains(RecordEntry item)
Parameters
Type | Name | Description |
---|---|---|
RecordEntry | item | The object to locate in the System.Collections.Generic.ICollection<>. |
Returns
Type | Description |
---|---|
System.Boolean | True if |
CopyTo(RecordEntry[], Int32)
Copies the elements of the System.Collections.Generic.ICollection<> to an System.Array, starting at a particular System.Array index.
Declaration
public virtual void CopyTo(RecordEntry[] array, int arrayIndex)
Parameters
Type | Name | Description |
---|---|---|
RecordEntry[] | array | The one-dimensional System.Array that is the destination of the elements copied from System.Collections.Generic.ICollection<>. The System.Array must have zero-based indexing. |
System.Int32 | arrayIndex | The zero-based index in |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentOutOfRangeException |
|
System.ArgumentException |
|
Dispose()
Disposes all the resources used by the RecordsListBase class.
Declaration
public void Dispose()
Dispose(Boolean)
Releases the unmanaged and optionally releases the managed resources used by the RecordsListBase class.
Declaration
protected virtual void Dispose(bool isDisposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isDisposing | A boolean value indicating whether to release both managed and unmanaged resources. |
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public virtual IEnumerator<RecordEntry> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<RecordEntry> | A System.Collections.Generic.IEnumerator<> that can be used to iterate through the collection. |
GetRecord(Int32)
Returns the object of RecordEntry for the specified record index.
Declaration
public virtual RecordEntry GetRecord(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the record whose record entry instance is to be obtained. |
Returns
Type | Description |
---|---|
RecordEntry | Returns the object of RecordEntry for the specified record index. |
GetRecord(Object)
Returns the object of RecordEntry for the specified data in the underlying collection.
Declaration
public virtual RecordEntry GetRecord(object data)
Parameters
Type | Name | Description |
---|---|---|
System.Object | data | The data whose record entry is to be obtained. |
Returns
Type | Description |
---|---|
RecordEntry | Returns the object of RecordEntry for the specified data in the underlying collection. |
GetRecordEntry(Int32, Object)
Returns the object of RecordEntry for the specified record index and data in the underlying collection.
Declaration
public virtual RecordEntry GetRecordEntry(int recordIndex, object data = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | recordIndex | The index of the record whose record entry instance is to be obtained. |
System.Object | data | The data whose record entry is to be obtained. |
Returns
Type | Description |
---|---|
RecordEntry | Returns the object of RecordEntry for the specified record index and data in the underlying collection. |
GetSource()
Returns the source of the record entry collection.
Declaration
public virtual List<object> GetSource()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.Object> | Returns the source of the record entry collection. |
IndexOf(RecordEntry)
Returns the index of the given record entry in the underlying collection.
Declaration
public virtual int IndexOf(RecordEntry item)
Parameters
Type | Name | Description |
---|---|---|
RecordEntry | item | The record entry whose index is to be obtained. |
Returns
Type | Description |
---|---|
System.Int32 | Returns the index of the given record entry in the underlying collection. |
IndexOfRecord(Object)
Returns the index of the given data in the underlying collection.
Declaration
public virtual int IndexOfRecord(object data)
Parameters
Type | Name | Description |
---|---|---|
System.Object | data | The data whose index is to be obtained. |
Returns
Type | Description |
---|---|
System.Int32 | Returns the index of the given data in the underlying collection. |
Insert(Int32, RecordEntry)
Inserts an item to the System.Collections.Generic.IList<> at the specified index.
Declaration
public virtual void Insert(int index, RecordEntry item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which |
RecordEntry | item | The object to insert into the System.Collections.Generic.IList<>. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException |
|
System.NotSupportedException | The System.Collections.Generic.IList<> is read-only. |
OnCollectionChanged(Object, NotifyCollectionChangedEventArgs)
This method fires when the underlying collection is changed.
Declaration
protected virtual void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender of the event. |
System.Collections.Specialized.NotifyCollectionChangedEventArgs | e | The System.Collections.Specialized.NotifyCollectionChangedEventArgs that contains the data for the event. |
OnInitialize()
Initialize the internalList and indicesList collection.
Declaration
protected virtual void OnInitialize()
Remarks
The indicesList will not be initialized in VirtualRecordsList
Remove(RecordEntry)
Removes the first occurrence of a specific object from the System.Collections.Generic.ICollection<>.
Declaration
public virtual bool Remove(RecordEntry item)
Parameters
Type | Name | Description |
---|---|---|
RecordEntry | item | The object to remove from the System.Collections.Generic.ICollection<>. |
Returns
Type | Description |
---|---|
System.Boolean | true if |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | The System.Collections.Generic.ICollection<> is read-only. |
RemoveAt(Int32)
Removes the System.Collections.Generic.IList<> item at the specified index.
Declaration
public virtual void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the item to remove. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException |
|
System.NotSupportedException | The System.Collections.Generic.IList<> is read-only. |
ResumeUpdates()
Resumes the view updates. When the view is resumed, the view will be refreshed by which the change in the underlying data will be updated in the view.
Declaration
public virtual void ResumeUpdates()
SuspendUpdates()
Suspends the view updates. When the view is suspended, the change in the underlying data will not be updated in the view.
Declaration
public virtual void SuspendUpdates()
Events
CollectionChanged
Occurs when the underlying collection is changed.
Declaration
public virtual event NotifyCollectionChangedEventHandler CollectionChanged
Event Type
Type |
---|
System.Collections.Specialized.NotifyCollectionChangedEventHandler |