ImmutableQueue<T> Class

Definition

Represents an immutable queue.

NuGet package: System.Collections.Immutable (about immutable collections and how to install)

generic <typename T>
public ref class ImmutableQueue sealed : System::Collections::Generic::IEnumerable<T>, System::Collections::Immutable::IImmutableQueue<T>
public sealed class ImmutableQueue<T> : System.Collections.Generic.IEnumerable<T>, System.Collections.Immutable.IImmutableQueue<T>
type ImmutableQueue<'T> = class
    interface seq<'T>
    interface IEnumerable
    interface IImmutableQueue<'T>
Public NotInheritable Class ImmutableQueue(Of T)
Implements IEnumerable(Of T), IImmutableQueue(Of T)

Type Parameters

T

The type of elements in the queue.

Inheritance
ImmutableQueue<T>
Implements

Properties

Empty

Gets an empty immutable queue.

IsEmpty

Gets a value that indicates whether this immutable queue is empty.

NuGet package: System.Collections.Immutable (about immutable collections and how to install)

Methods

Clear()

Removes all objects from the immutable queue.

Dequeue()

Removes the element at the beginning of the immutable queue, and returns the new queue.

Dequeue(T)

Removes the item at the beginning of the immutable queue, and returns the new queue.

Enqueue(T)

Adds an element to the end of the immutable queue, and returns the new queue.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEnumerator()

Returns an enumerator that iterates through the immutable queue.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Peek()

Returns the element at the beginning of the immutable queue without removing it.

PeekRef()

Gets a read-only reference to the element at the front of the queue.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

IEnumerable<T>.GetEnumerator()

Returns an enumerator that iterates through the collection.

IImmutableQueue<T>.Clear()

Removes all elements from the immutable queue.

IImmutableQueue<T>.Dequeue()

Removes the element at the beginning of the immutable queue, and returns the new queue.

IImmutableQueue<T>.Enqueue(T)

Adds an element to the end of the immutable queue, and returns the new queue.

Extension Methods

Dequeue<T>(IImmutableQueue<T>, T)

Removes the item at the beginning of the immutable queue, and returns the new queue.

CopyToDataTable<T>(IEnumerable<T>)

Returns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

Copies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

Copies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>)

Returns a collection of elements that contains the ancestors of every node in the source collection.

Ancestors<T>(IEnumerable<T>, XName)

Returns a filtered collection of elements that contains the ancestors of every node in the source collection. Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>)

Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>)

Returns a collection of elements that contains the descendant elements of every element and document in the source collection.

Descendants<T>(IEnumerable<T>, XName)

Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. Only elements that have a matching XName are included in the collection.

Elements<T>(IEnumerable<T>)

Returns a collection of the child elements of every element and document in the source collection.

Elements<T>(IEnumerable<T>, XName)

Returns a filtered collection of the child elements of every element and document in the source collection. Only elements that have a matching XName are included in the collection.

InDocumentOrder<T>(IEnumerable<T>)

Returns a collection of nodes that contains all nodes in the source collection, sorted in document order.

Nodes<T>(IEnumerable<T>)

Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>)

Removes every node in the source collection from its parent node.

Applies to

Thread Safety

This type is thread safe.