Skip to main content

Class StackCollection

Represents a collection of Stacks.

Declaration
public class StackCollection : IEnumerable<KeyValuePair<int, Stack>>, IEnumerable

Implements:
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Int32,Bidtellect.Tcf.Models.Components.VendorList.Stack>>, System.Collections.IEnumerable

Properties

Count

Gets the number of elements contained in this collection.

Declaration
public int Count { get; }

Fields

stacks

Declaration
protected Dictionary<int, Stack> stacks

Methods

Add(Stack)

Adds a Stack to this collection.

Declaration
public void Add(Stack stack)
Parameters
TypeNameDescription
Bidtellect.Tcf.Models.Components.VendorList.StackstackThe Stack to be added.
Exceptions

System.ArgumentNullException

Remove(int)

Removes a Stack with the given ID from this collection.

Declaration
public bool Remove(int stackId)
Returns

System.Boolean: A value indicating whether the Stack was successfully found and removed.

Parameters
TypeNameDescription
System.Int32stackIdThe ID of the stack.

Remove(Stack)

Removes a Stack from this collection.

Declaration
public bool Remove(Stack stack)
Returns

System.Boolean: A value indicating whether the Stack was successfully found and removed.

Parameters
TypeNameDescription
Bidtellect.Tcf.Models.Components.VendorList.StackstackThe Stack to be removed.
Exceptions

System.ArgumentNullException

Contains(int)

Determines whether the collection contains a Stack with the given ID.

Declaration
public bool Contains(int stackId)
Returns

System.Boolean: true if this collection contains a Stack with the given ID; otherwise, false.

Parameters
TypeNameDescription
System.Int32stackIdThe ID of the Stack.

TryGet(int, out Stack)

Gets a Stack with the given ID.

Declaration
public bool TryGet(int stackId, out Stack stack)
Returns

System.Boolean: true if this collection contains a Feature with the given ID; otherwise, false.

Parameters
TypeNameDescription
System.Int32stackIdThe ID of the Stack.
Bidtellect.Tcf.Models.Components.VendorList.StackstackWhen this method returns, contains the Stack,
if the ID is found; otherwise, null.
This parameter is passed uninitialized.

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public IEnumerator<KeyValuePair<int, Stack>> GetEnumerator()
Returns

System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.Int32,Bidtellect.Tcf.Models.Components.VendorList.Stack>>: An enumerator that can be used to iterate through the collection.

Implements

  • System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Int32,Bidtellect.Tcf.Models.Components.VendorList.Stack>>
  • System.Collections.IEnumerable