Class CollectionBase<T>
CollectionBase
Implements
Namespace: Syncfusion.XlsIO.Implementation.Collections
Assembly: Syncfusion.XlsIO.UWP.dll
Syntax
public class CollectionBase<T> : Object, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable
Type Parameters
Name |
---|
T |
Constructors
CollectionBase()
Initializes a new instance of the class with the default initial capacity.
Declaration
public CollectionBase()
CollectionBase(Int32)
Initializes a new instance of the class with the specified capacity.
Declaration
public CollectionBase(int capacity)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | capacity | The number of elements that the new list can initially store. |
Properties
Capacity
Gets or sets the number of elements that the System.Collections.CollectionBase can contain.
Declaration
public int Capacity { get; set; }
Property Value
Type |
---|
System.Int32 |
Count
Gets the number of elements contained in the System.Collections.CollectionBase instance.
Declaration
public int Count { get; }
Property Value
Type |
---|
System.Int32 |
InnerList
Gets the list of elements in the instance.
Declaration
protected List<T> InnerList { get; }
Property Value
Type |
---|
System.Collections.Generic.List<T> |
IsReadOnly
Gets if the collection is read-only.
Declaration
public bool IsReadOnly { get; }
Property Value
Type |
---|
System.Boolean |
Item[Int32]
Gets or sets the list of elements in the instance.
Declaration
public T this[int i] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | i |
Property Value
Type |
---|
T |
List
Gets the list of elements in the instance.
Declaration
protected IList<T> List { get; }
Property Value
Type |
---|
System.Collections.Generic.IList<T> |
Methods
Add(T)
Adds the item.
Declaration
public virtual void Add(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item |
Clear()
Removes all objects from the System.Collections.CollectionBase instance.
Declaration
public void Clear()
Contains(T)
Checks whether the list contains the item.
Declaration
public bool Contains(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item |
Returns
Type |
---|
System.Boolean |
CopyTo(T[], Int32)
Copies the array to specified index.
Declaration
public void CopyTo(T[] array, int arrayIndex)
Parameters
Type | Name | Description |
---|---|---|
T[] | array | |
System.Int32 | arrayIndex |
GetEnumerator()
Returns an enumerator that iterates through this instance.
Declaration
public IEnumerator<T> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<T> | An enumerator for this instance. |
IndexOf(T)
Gets the index of the item
Declaration
public int IndexOf(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item |
Returns
Type |
---|
System.Int32 |
Insert(Int32, T)
Inserts an element into the list at the specified index.
Declaration
public void Insert(int index, T item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which item should be inserted. |
T | item | The object to insert. The value can be null for reference types. |
OnClear()
Performs additional custom processes when clearing the contents of this instance.
Declaration
protected virtual void OnClear()
OnClearComplete()
Performs additional custom processes after clearing the contents of this instance.
Declaration
protected virtual void OnClearComplete()
OnInsert(Int32, T)
Performs additional custom processes before inserting a new element into this instance.
Declaration
protected virtual void OnInsert(int index, T value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which to insert value. |
T | value | The new value of the element at index. |
OnInsertComplete(Int32, T)
Performs additional custom processes after inserting a new element into this instance.
Declaration
protected virtual void OnInsertComplete(int index, T value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which to insert value. |
T | value | The new value of the element at index. |
OnRemove(Int32, T)
Performs additional custom processes when removing an element from this instance.
Declaration
protected virtual void OnRemove(int index, T value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which value can be found. |
T | value | The value of the element to remove from index. |
OnRemoveComplete(Int32, T)
Performs additional custom processes after removing an element from this instance.
Declaration
protected virtual void OnRemoveComplete(int index, T value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which value can be found. |
T | value | The value of the element to remove from index. |
OnSet(Int32, T, T)
Performs additional custom processes before setting a value in this instance.
Declaration
protected virtual void OnSet(int index, T oldValue, T newValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which oldValue can be found. |
T | oldValue | The value to replace with newValue. |
T | newValue | The new value of the element at index. |
OnSetComplete(Int32, T, T)
Performs additional custom processes after setting a value in this instance.
Declaration
protected virtual void OnSetComplete(int index, T oldValue, T newValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which oldValue can be found. |
T | oldValue | The value to replace with newValue. |
T | newValue | The new value of the element at index. |
Remove(T)
Removes the specified item.
Declaration
public bool Remove(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item |
Returns
Type |
---|
System.Boolean |
RemoveAt(Int32)
Removes the element at the specified index of this instance.
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the element to remove. |