Class TimedObjectsManager
Provides a way to manage timed objects of different types within an EventsCollection
(which can be obtained via Events for example). More info in the
Objects managers article.
Implements
Inherited Members
Namespace: Melanchall.DryWetMidi.Interaction
Assembly: Melanchall.DryWetMidi.dll
Syntax
public sealed class TimedObjectsManager : TimedObjectsManager<ITimedObject>, IDisposable
Remarks
To start manage objects you need to get an instance of the TimedObjectsManager.
To finish managing you need to call the SaveChanges() or Dispose() method.
Since the manager implements IDisposable it is recommended to manage objects within
the using
block.
Constructors
TimedObjectsManager(EventsCollection, ObjectType, ObjectDetectionSettings, TimedObjectsComparer)
Initializes a new instance of the TimedObjectsManager with the specified
events collection and object type. Optionally object detection settings and comparer can be provided.
Declaration
public TimedObjectsManager(EventsCollection eventsCollection, ObjectType objectType, ObjectDetectionSettings objectDetectionSettings = null, TimedObjectsComparer comparer = null)
Parameters
Type | Name | Description |
---|---|---|
EventsCollection | eventsCollection | EventsCollection to manage objects within. |
ObjectType | objectType | The type of objects to manage. |
ObjectDetectionSettings | objectDetectionSettings | Settings according to which objects should be detected and built. |
TimedObjectsComparer | comparer | Comparer that will be used to order objects on enumerating
Objects or saving objects back to the eventsCollection
via SaveChanges() or Dispose(). |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | eventsCollection is null . |