Table of Contents

Class KeyedActionQueue<TKey>

Namespace
DrawnUi.Draw
Assembly
DrawnUi.Maui.dll
public class KeyedActionQueue<TKey> where TKey : notnull

Type Parameters

TKey
Inheritance
KeyedActionQueue<TKey>
Inherited Members
Extension Methods

Constructors

KeyedActionQueue(int)

Initializes a new instance of the FastKeyedActionQueue with specified initial capacity

public KeyedActionQueue(int capacity = 1024)

Parameters

capacity int

Properties

Count

Gets the current count of queued actions

public int Count { get; }

Property Value

int

Methods

Clear()

Removes all queued actions

public void Clear()

ContainsKey(TKey)

Checks if a key exists in the queue

public bool ContainsKey(TKey key)

Parameters

key TKey

Returns

bool

Dequeue()

Dequeues the next action in FIFO order

public Action? Dequeue()

Returns

Action

Enqueue(TKey, Action)

Enqueues an action with a key, removing any existing action with the same key

public void Enqueue(TKey key, Action action)

Parameters

key TKey
action Action

ExecuteAll()

Dequeues and executes all actions in FIFO order

public void ExecuteAll()

TryRemove(TKey)

Tries to remove an action by key

public bool TryRemove(TKey key)

Parameters

key TKey

Returns

bool