Class UpdatableCollection
- Namespace
- FinanceSharp.Helpers
- Assembly
- FinanceSharp.dll
A List<T> that supports + operator to add items.
public class UpdatableCollection : List<IUpdatable>, IList<IUpdatable>, ICollection<IUpdatable>, IReadOnlyList<IUpdatable>, IReadOnlyCollection<IUpdatable>, IEnumerable<IUpdatable>, IList, ICollection, IEnumerable
- Inheritance
-
UpdatableCollection
- Implements
- Inherited Members
- Extension Methods
Constructors
UpdatableCollection()
Initializes a new instance of the List<T> class that is empty and has the default initial capacity.
public UpdatableCollection()
UpdatableCollection(IEnumerable<IUpdatable>)
Initializes a new instance of the List<T> class that contains elements copied from the specified collection and has sufficient capacity to accommodate the number of elements copied.
public UpdatableCollection(IEnumerable<IUpdatable> collection)
Parameters
collectionIEnumerable<IUpdatable>The collection whose elements are copied to the new list.
Exceptions
- ArgumentNullException
collectionis null.
UpdatableCollection(int)
Initializes a new instance of the List<T> class that is empty and has the specified initial capacity.
public UpdatableCollection(int capacity)
Parameters
capacityintThe number of elements that the new list can initially store.
Exceptions
- ArgumentOutOfRangeException
capacityis less than 0.
Methods
AddRange<T>(T[])
public T[] AddRange<T>(T[] updatable) where T : IUpdatable
Parameters
updatableT[]
Returns
- T[]
Type Parameters
T
Add<T>(T)
public T Add<T>(T updatable) where T : IUpdatable
Parameters
updatableT
Returns
- T
Type Parameters
T
Operators
operator +(UpdatableCollection, IUpdatable)
public static IUpdatable operator +(UpdatableCollection list, IUpdatable newItem)
Parameters
listUpdatableCollectionnewItemIUpdatable
Returns
operator +(UpdatableCollection, IEnumerable<IUpdatable>)
public static IEnumerable<IUpdatable> operator +(UpdatableCollection list, IEnumerable<IUpdatable> newItems)
Parameters
listUpdatableCollectionnewItemsIEnumerable<IUpdatable>