Class ManagedConcurrentStack<TValue>
A ConcurrentStack that maps to the appropriate platform version.
Inheritance
System.Object
ManagedConcurrentStack<TValue>
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class ManagedConcurrentStack<TValue> : object
Type Parameters
Name | Description |
---|---|
TValue |
Constructors
ManagedConcurrentStack()
Creates a new instance of a ConcurrentStack.
Declaration
public ManagedConcurrentStack()
Properties
Count
Gets the amount of items in the stack.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System. |
IsEmpty
Gets true if the stack is empty.
Declaration
public bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
Clear()
Clears the stack of all items.
Declaration
public void Clear()
Push(TValue)
Pushes a new item on top of the stack.
Declaration
public void Push(TValue item)
Parameters
Type | Name | Description |
---|---|---|
TValue | item | The item to push. |
TryPeek(out TValue)
Tries to peek at the top value in stack.
Declaration
public bool TryPeek(out TValue result)
Parameters
Type | Name | Description |
---|---|---|
TValue | result | The value from the stack if possible, null otherwise. |
Returns
Type | Description |
---|---|
System. |
True if peek succeeded, false if not. |
TryPop(out TValue)
Tries to pop the top value off of the stack.
Declaration
public bool TryPop(out TValue result)
Parameters
Type | Name | Description |
---|---|---|
TValue | result | The value from the top of the stack if possible, null otherwise. |
Returns
Type | Description |
---|---|
System. |
True if pop suceeded, false if not. |