Class TimedDataSourceManager
A singleton class that keeps track of ITimedDataSource instances.
Namespace: Unity.LiveCapture
Syntax
public sealed class TimedDataSourceManager : IEnumerable<ITimedDataSource>
Properties
Entries
Gets the list of registered sources.
Declaration
public IReadOnlyList<ITimedDataSource> Entries { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<ITimedDataSource> |
Instance
The TimedDataSourceManager instance.
Declaration
public static TimedDataSourceManager Instance { get; }
Property Value
Type | Description |
---|---|
TimedDataSourceManager |
Item[String]
Gets the ITimedDataSource with the specified ID.
Declaration
public ITimedDataSource this[string id] { get; }
Parameters
Type | Name | Description |
---|---|---|
String | id | The ID of the source to get. |
Property Value
Type | Description |
---|---|
ITimedDataSource | The source, or null if none with the given ID are registered. |
Methods
Clear()
Unregister all sources.
Declaration
public void Clear()
EnsureIdIsValid(ref String)
Creates a new ID if the given ID is uninitialized or is already used.
Declaration
public bool EnsureIdIsValid(ref string id)
Parameters
Type | Name | Description |
---|---|---|
String | id | The ID to initialize. |
Returns
Type | Description |
---|---|
Boolean |
GetEnumerator()
Gets an enumerator that iterates over all registered sources.
Declaration
public IEnumerator<ITimedDataSource> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<ITimedDataSource> | An enumerator for the collection. |
Register(ITimedDataSource)
Adds a ITimedDataSource to the registry.
Declaration
public bool Register(ITimedDataSource source)
Parameters
Type | Name | Description |
---|---|---|
ITimedDataSource | source | The source to register. |
Returns
Type | Description |
---|---|
Boolean |
|
Unregister(ITimedDataSource)
Removes a ITimedDataSource from the registry.
Declaration
public bool Unregister(ITimedDataSource source)
Parameters
Type | Name | Description |
---|---|---|
ITimedDataSource | source | The source to unregister. |
Returns
Type | Description |
---|---|
Boolean |
|
Events
Added
An event triggered when a new source is registered.
Declaration
public event Action<ITimedDataSource> Added
Event Type
Type | Description |
---|---|
Action<ITimedDataSource> |
Removed
An event triggered when a source is unregistered.
Declaration
public event Action<ITimedDataSource> Removed
Event Type
Type | Description |
---|---|
Action<ITimedDataSource> |