Skip to main content

Class VendorCollection

Represents a collection of Vendors.

Declaration
public class VendorCollection : IEnumerable<KeyValuePair<int, Vendor>>, IEnumerable

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

Properties

Ids

Gets an enumerable collection of the Vendor 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

vendors

Declaration
protected Dictionary<int, Vendor> vendors

Methods

Add(Vendor)

Adds a Vendor to this collection.

Declaration
public void Add(Vendor vendor)
Parameters
TypeNameDescription
Bidtellect.Tcf.Models.Components.VendorList.VendorvendorThe Vendor to be added.
Exceptions

System.ArgumentException
System.ArgumentOutOfRangeException

Add(int)

Adds a Vendor to this collection.

Declaration
public void Add(int vendorId)
Parameters
TypeNameDescription
System.Int32vendorIdThe ID of the Vendor.
Exceptions

System.ArgumentException
System.ArgumentOutOfRangeException

Add(int, Vendor)

Adds a Vendor to this collection.

Declaration
public void Add(int vendorId, Vendor vendor)
Parameters
TypeNameDescription
System.Int32vendorIdThe ID of the Vendor.
Bidtellect.Tcf.Models.Components.VendorList.VendorvendorThe Vendor to be added.
Exceptions

System.ArgumentException
System.ArgumentOutOfRangeException

Remove(int)

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

Declaration
public bool Remove(int vendorId)
Returns

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

Parameters
TypeNameDescription
System.Int32vendorIdThe ID of the Vendor.

Remove(Vendor)

Removes a Vendor from this collection.

Declaration
public bool Remove(Vendor vendor)
Returns

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

Parameters
TypeNameDescription
Bidtellect.Tcf.Models.Components.VendorList.VendorvendorThe Vendor to be removed.
Exceptions

System.ArgumentNullException

Contains(int)

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

Declaration
public bool Contains(int vendorId)
Returns

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

Parameters
TypeNameDescription
System.Int32vendorIdThe ID of the Vendor.

TryGet(int, out Vendor)

Gets a Vendor with the given ID.

Declaration
public bool TryGet(int vendorId, out Vendor vendor)
Returns

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

Parameters
TypeNameDescription
System.Int32vendorIdThe ID of the Vendor.
Bidtellect.Tcf.Models.Components.VendorList.VendorvendorWhen this method returns, contains the Vendor,
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, Vendor>> GetEnumerator()
Returns

System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.Int32,Bidtellect.Tcf.Models.Components.VendorList.Vendor>>: 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.Vendor>>
  • System.Collections.IEnumerable