Class StackCollection
Represents a collection of Stacks.
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.
public int Count { get; }
Fields
stacks
protected Dictionary<int, Stack> stacks
Methods
Add(Stack)
Adds a Stack to this collection.
public void Add(Stack stack)
Parameters
Type | Name | Description |
---|---|---|
Bidtellect.Tcf.Models.Components.VendorList.Stack | stack | The Stack to be added. |
Exceptions
System.ArgumentNullException
Remove(int)
Removes a Stack with the given ID from this collection.
public bool Remove(int stackId)
Returns
System.Boolean
: A value indicating whether the Stack was successfully found and removed.
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | stackId | The ID of the stack. |
Remove(Stack)
Removes a Stack from this collection.
public bool Remove(Stack stack)
Returns
System.Boolean
: A value indicating whether the Stack was successfully found and removed.
Parameters
Type | Name | Description |
---|---|---|
Bidtellect.Tcf.Models.Components.VendorList.Stack | stack | The Stack to be removed. |
Exceptions
System.ArgumentNullException
Contains(int)
Determines whether the collection contains a Stack with the given ID.
public bool Contains(int stackId)
Returns
System.Boolean
: true
if this collection contains a Stack with the given ID;
otherwise, false
.
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | stackId | The ID of the Stack. |
TryGet(int, out Stack)
Gets a Stack with the given ID.
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
Type | Name | Description |
---|---|---|
System.Int32 | stackId | The ID of the Stack. |
Bidtellect.Tcf.Models.Components.VendorList.Stack | stack | When 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.
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