Search Results for

    Show / Hide Table of Contents
    View Source

    Class StackQueue<T>

    Collection that can be both a queue and a stack.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Collections
    Assembly: Umbraco.Core.dll
    Syntax
    public class StackQueue<T>
    Type Parameters
    Name Description
    T

    Constructors

    View Source

    StackQueue()

    Declaration
    public StackQueue()

    Properties

    View Source

    Count

    Gets the number of elements contained in the collection.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    int

    Methods

    View Source

    Clear()

    Removes all elements from the collection.

    Declaration
    public void Clear()
    View Source

    Dequeue()

    Removes and returns the object at the beginning of the queue (from the back).

    Declaration
    public T Dequeue()
    Returns
    Type Description
    T

    The object removed from the beginning of the queue.

    View Source

    Enqueue(T?)

    Adds an object to the queue (adds to the front).

    Declaration
    public void Enqueue(T? obj)
    Parameters
    Type Name Description
    T obj

    The object to add to the queue.

    View Source

    PeekQueue()

    Returns the object at the beginning of the queue without removing it.

    Declaration
    public T? PeekQueue()
    Returns
    Type Description
    T

    The object at the beginning of the queue, or the default value if the collection is empty.

    View Source

    PeekStack()

    Returns the object at the top of the stack without removing it.

    Declaration
    public T? PeekStack()
    Returns
    Type Description
    T

    The object at the top of the stack, or the default value if the collection is empty.

    View Source

    Pop()

    Removes and returns the object at the top of the stack (from the front).

    Declaration
    public T Pop()
    Returns
    Type Description
    T

    The object removed from the top of the stack.

    View Source

    Push(T?)

    Pushes an object onto the stack (adds to the front).

    Declaration
    public void Push(T? obj)
    Parameters
    Type Name Description
    T obj

    The object to push onto the stack.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX