Show / Hide Table of Contents

Class UpdateQueue<TIdentifier, TData>

Represents a generic update queue.

Inheritance
object
AbstractReferenceCounting
UpdateQueue<TIdentifier, TData>
UpdateQueue
Implements
IUpdateQueue<TIdentifier, TData>
IReferenceCounting
IDisposable
Inherited Members
AbstractReferenceCounting.ActiveReferenceCount
AbstractReferenceCounting.AddReferencingObject(object)
AbstractReferenceCounting.RemoveReferencingObject(object)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
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 Source

UpdateQueue(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 Source

RequiresFlush

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 Source

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public virtual void Dispose()
| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

Reset()

Resets the current data set.

Declaration
public virtual void Reset()
| Edit this page View Source

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
| Edit this page View Source

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

Implements

IUpdateQueue<TIdentifier, TData>
IReferenceCounting
IDisposable

Extension Methods

ReferenceCountingExtension.HasActiveReferences(IReferenceCounting)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX