Class TimedObjectsCollection<TObject>
Inheritance
TimedObjectsCollection<TObject>
Assembly: Melanchall.DryWetMidi.dll
Syntax
public sealed class TimedObjectsCollection<TObject> : ICollection<TObject>, IEnumerable<TObject>, IEnumerable where TObject : ITimedObject
Type Parameters
| Name |
Description |
| TObject |
The type of elements in the collection. |
Properties
Count
Declaration
public int Count { get; }
Property Value
IsReadOnly
Declaration
public bool IsReadOnly { get; }
Property Value
Methods
Add(IEnumerable<TObject>)
Adds objects to this collection.
Declaration
public void Add(IEnumerable<TObject> objects)
Parameters
| Type |
Name |
Description |
| IEnumerable<TObject> |
objects |
Objects to add to the collection. |
Exceptions
Add(TObject)
Adds an object to this collection.
Declaration
public void Add(TObject obj)
Parameters
| Type |
Name |
Description |
| TObject |
obj |
Object to add to the collection. |
Exceptions
Add(params TObject[])
Adds objects to this collection.
Declaration
public void Add(params TObject[] objects)
Parameters
| Type |
Name |
Description |
| TObject[] |
objects |
Objects to add to the collection. |
Exceptions
Clear()
Removes all objects from this collection.
Declaration
Contains(TObject)
Declaration
public bool Contains(TObject obj)
Parameters
Returns
| Type |
Description |
| bool |
true if the object is found; otherwise, false. |
CopyTo(TObject[], int)
Declaration
public void CopyTo(TObject[] array, int arrayIndex)
Parameters
| Type |
Name |
Description |
| TObject[] |
array |
The one-dimensional array that is the destination of the objects
copied from TimedObjectsCollection<TObject>. The array must have
zero-based indexing. |
| int |
arrayIndex |
The zero-based index in array at which copying begins. |
Exceptions
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<TObject> GetEnumerator()
Returns
| Type |
Description |
| IEnumerator<TObject> |
An enumerator that can be used to iterate through the collection. |
Remove(IEnumerable<TObject>)
Removes objects from this collection.
Declaration
public bool Remove(IEnumerable<TObject> objects)
Parameters
| Type |
Name |
Description |
| IEnumerable<TObject> |
objects |
Objects to remove from the collection. |
Returns
| Type |
Description |
| bool |
true if objects were successfully removed from the collection;
otherwise, false. |
Exceptions
Remove(TObject)
Removes the first occurrence of a specific object from this collection
Declaration
public bool Remove(TObject obj)
Parameters
| Type |
Name |
Description |
| TObject |
obj |
Object to remove from the collection. |
Returns
| Type |
Description |
| bool |
true if the object was successfully removed; otherwise, false. |
Exceptions
Remove(params TObject[])
Removes objects from this collection.
Declaration
public bool Remove(params TObject[] objects)
Parameters
| Type |
Name |
Description |
| TObject[] |
objects |
Objects to remove from the collection. |
Returns
| Type |
Description |
| bool |
true if objects were successfully removed from the collection;
otherwise, false. |
Exceptions
RemoveAll(Predicate<TObject>)
Removes all the objects that match the conditions defined by the specified predicate.
Declaration
public void RemoveAll(Predicate<TObject> match)
Parameters
| Type |
Name |
Description |
| Predicate<TObject> |
match |
The Predicate<T> delegate that defines the conditions of
the objects to remove. |
Exceptions
Events
CollectionChanged
Occurs when objects collection changes (an object added or removed).
Declaration
public event TimedObjectsCollectionChangedEventHandler<TObject> CollectionChanged
Event Type
Implements
Extension Methods