Skip to main content

Class FeatureCollection

Represents a collection of Features.

Declaration
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.

Declaration
public IEnumerable<int> Ids { get; }

Count

Gets the number of elements contained in this collection.

Declaration
public int Count { get; }

Fields

features

Declaration
protected Dictionary<int, Feature> features

Methods

Add(Feature)

Adds a Feature to this collection.

Declaration
public void Add(Feature feature)
Parameters
TypeNameDescription
Bidtellect.Tcf.Models.Components.VendorList.FeaturefeatureThe Feature to be added.
Exceptions

System.ArgumentException
System.ArgumentOutOfRangeException

Add(int)

Adds a Feature to this collection.

Declaration
public void Add(int featureId)
Parameters
TypeNameDescription
System.Int32featureIdThe ID of the feature.
Exceptions

System.ArgumentException
System.ArgumentOutOfRangeException

Add(int, Feature)

Adds a Feature to this collection.

Declaration
public void Add(int featureId, Feature feature)
Parameters
TypeNameDescription
System.Int32featureIdThe ID of the feature.
Bidtellect.Tcf.Models.Components.VendorList.FeaturefeatureThe Feature to be added.
Exceptions

System.ArgumentException
System.ArgumentOutOfRangeException

Remove(int)

Removes a Feature with the given Feature ID from this collection.

Declaration
public bool Remove(int featureId)
Returns

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

Parameters
TypeNameDescription
System.Int32featureIdThe ID of the Feature.

Remove(Feature)

Removes a Feature from this collection.

Declaration
public bool Remove(Feature feature)
Returns

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

Parameters
TypeNameDescription
Bidtellect.Tcf.Models.Components.VendorList.FeaturefeatureThe Feature to be removed.
Exceptions

System.ArgumentNullException

Contains(int)

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

Declaration
public bool Contains(int featureId)
Returns

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

Parameters
TypeNameDescription
System.Int32featureIdThe ID of the Feature.

TryGet(int, out Feature)

Gets a Feature with the given ID.

Declaration
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
TypeNameDescription
System.Int32featureIdThe ID of the Feature.
Bidtellect.Tcf.Models.Components.VendorList.FeaturefeatureWhen 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.

Declaration
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