Class FeatureCollection
Represents a collection of Features.
public class FeatureCollection : IEnumerable<KeyValuePair<int, Feature>>, IEnumerable
Implements:
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Int32,Bidtellect.Tcf.Models.Components.VendorList.Feature>>
, System.Collections.IEnumerable
Properties
Ids
Gets an enumerable collection of the Feature IDs contained in this collection.
public IEnumerable<int> Ids { get; }
Count
Gets the number of elements contained in this collection.
public int Count { get; }
Fields
features
protected Dictionary<int, Feature> features
Methods
Add(Feature)
Adds a Feature to this collection.
public void Add(Feature feature)
Parameters
Type | Name | Description |
---|---|---|
Bidtellect.Tcf.Models.Components.VendorList.Feature | feature | The Feature to be added. |
Exceptions
System.ArgumentException
System.ArgumentOutOfRangeException
Add(int)
Adds a Feature to this collection.
public void Add(int featureId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | featureId | The ID of the feature. |
Exceptions
System.ArgumentException
System.ArgumentOutOfRangeException
Add(int, Feature)
Adds a Feature to this collection.
public void Add(int featureId, Feature feature)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | featureId | The ID of the feature. |
Bidtellect.Tcf.Models.Components.VendorList.Feature | feature | The Feature to be added. |
Exceptions
System.ArgumentException
System.ArgumentOutOfRangeException
Remove(int)
Removes a Feature with the given Feature ID from this collection.
public bool Remove(int featureId)
Returns
System.Boolean
: A value indicating whether the Feature was successfully found and removed.
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | featureId | The ID of the Feature. |
Remove(Feature)
Removes a Feature from this collection.
public bool Remove(Feature feature)
Returns
System.Boolean
: A value indicating whether the Feature was successfully found and removed.
Parameters
Type | Name | Description |
---|---|---|
Bidtellect.Tcf.Models.Components.VendorList.Feature | feature | The Feature to be removed. |
Exceptions
System.ArgumentNullException
Contains(int)
Determines whether the collection contains a Feature with the given ID.
public bool Contains(int featureId)
Returns
System.Boolean
: true
if this collection contains a Feature with the given ID;
otherwise, false
.
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | featureId | The ID of the Feature. |
TryGet(int, out Feature)
Gets a Feature with the given ID.
public bool TryGet(int featureId, out Feature feature)
Returns
System.Boolean
: true
if this collection contains a Feature with the given ID;
otherwise, false
.
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | featureId | The ID of the Feature. |
Bidtellect.Tcf.Models.Components.VendorList.Feature | feature | When this method returns, contains the Feature, |
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, Feature>> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.Int32,Bidtellect.Tcf.Models.Components.VendorList.Feature>>
: 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.Feature>>
System.Collections.IEnumerable