Class UpdateQueue<TIdentifier, TData>
Represents a generic update queue.
Inherited Members
Namespace: RGB.NET.Core
Assembly: RGB.NET.Core.dll
Syntax
public abstract class UpdateQueue<TIdentifier, TData> : AbstractReferenceCounting, IUpdateQueue<TIdentifier, TData>, IReferenceCounting, IDisposable where TIdentifier : notnull
Type Parameters
Name | Description |
---|---|
TIdentifier | The type of the key used to identify some data. |
TData | The type of the data. |
Constructors
| Edit this page View SourceUpdateQueue(IDeviceUpdateTrigger)
Initializes a new instance of the UpdateQueue<TIdentifier, TData> class.
Declaration
protected UpdateQueue(IDeviceUpdateTrigger updateTrigger)
Parameters
Type | Name | Description |
---|---|---|
IDeviceUpdateTrigger | updateTrigger | The IDeviceUpdateTrigger causing this queue to update. |
Properties
| Edit this page View SourceRequiresFlush
Gets a bool indicating if the queue requires a flush of all data due to an internal error.
Declaration
public bool RequiresFlush { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public virtual void Dispose()
OnStartup(object?, CustomUpdateData)
Event handler for the Starting-event.
Declaration
protected virtual void OnStartup(object? sender, CustomUpdateData customData)
Parameters
Type | Name | Description |
---|---|---|
object | sender | The starting IUpdateTrigger. |
CustomUpdateData | customData | CustomUpdateData provided by the trigger. |
OnUpdate(object?, CustomUpdateData)
Event handler for the Update-event.
Declaration
protected virtual void OnUpdate(object? sender, CustomUpdateData customData)
Parameters
Type | Name | Description |
---|---|---|
object | sender | The IUpdateTrigger causing this update. |
CustomUpdateData | customData | CustomUpdateData provided by the trigger. |
Reset()
Resets the current data set.
Declaration
public virtual void Reset()
SetData(ReadOnlySpan<(TIdentifier, TData)>)
Sets or merges the provided data set in the current dataset and notifies the trigger that there is new data available.
Declaration
public virtual void SetData(ReadOnlySpan<(TIdentifier, TData)> data)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<(TIdentifier, TData)> | data |
Update(in ReadOnlySpan<(TIdentifier key, TData color)>)
Performs the update this queue is responsible for.
Declaration
protected abstract bool Update(in ReadOnlySpan<(TIdentifier key, TData color)> dataSet)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<(TIdentifier, TData)> | dataSet | The set of data that needs to be updated. |
Returns
Type | Description |
---|---|
bool |