Click or drag to resize

CrestronQueueT Class

Fixed-size generic type queue that supports concurrent access and blocking for specified amounts of time while performing operations
Inheritance Hierarchy
SystemObject
  Crestron.SimplSharpCrestronQueueT
    Crestron.SimplSharpCrestronQueue

Namespace: Crestron.SimplSharp
Assembly: SimplSharpHelperInterface (in SimplSharpHelperInterface.dll) Version: 2.21.121
Syntax
C#
public class CrestronQueue<T> : IDisposable, 
	IEnumerable<T>, IEnumerable

Type Parameters

T
The element type of the queue

The CrestronQueueT type exposes the following members.

Constructors
 NameDescription
Public methodCrestronQueueT Create a new queue of the default size (5 elements maximum)
Public methodCrestronQueueT(Int32) Create a new queue of a fixed size
Top
Properties
 NameDescription
Public propertyCount Number of elements currently in the queue
Public propertyDisposed Property to determine if this object has been disposed.
Public propertyIsEmpty Whether the queue is empty (all the slots are not taken)
Public propertyIsFull Whether the queue is full (there are no slots remaining)
Public propertySize Get the size of the queue
Top
Methods
 NameDescription
Public methodClear Remove all elements from the CrestronQueue.
Public methodContains Determines whether an element is currently in the queue
Public methodCopyTo Copies the Queue's elements to an existing one-dimensional array, starting at the specified array index.
Public methodDequeue Remove an object from the queue and block indefinitely until an object can be removed
Public methodDequeue(T) Remove an object from the queue and block indefinitely until an object can be removed
Public methodDequeue(UInt32) Remove an object from the queue, but only block for the specified amount of time Dequeue(0) is equivalent to TryToDequeue()
Public methodDequeue(UInt32, T) Remove an object from the queue, but only block for the specified amount of time Dequeue with a timeout of 0 is equivalent to TryToDequeue()
Public methodDispose Clean up of unmanaged resources
Public methodEnqueue(T) Add an element to the end of the queue and block indefinitely until the element can be added.
Public methodEnqueue(T, UInt32) Add an element to the end of the queue, but only block for the specified amount of time The addition will be continuously attempted until the end of the specified amount of time Enqueue(element, 0) is equivalent to TryToEnqueue(element)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetEnumerator Returns a generic enumerator that iterates through the queue.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodPeek Returns the element at the beginning of the queue without removing it
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodTryToDequeue Attempt to remove an element from the queue and do not block
Public methodTryToDequeue(T) Attempt to remove an element from the queue and do not block
Public methodTryToEnqueue Attempt to add an element to the end of the queue and do not block
Top

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also