ItemCollection<T> Class

A named item collection.

Item names must be unique (compared with case insensitive comparer) throughout the collection.

Inheritance Hierarchy

System.Object
  Microsoft.TeamFoundation.Warehouse.ItemCollection<T>

Namespace:  Microsoft.TeamFoundation.Warehouse
Assembly:  Microsoft.TeamFoundation.Warehouse (in Microsoft.TeamFoundation.Warehouse.dll)

Syntax

'Declaration
Public Class ItemCollection(Of T As NamedItem) _
    Implements IEnumerable(Of T), IEnumerable
public class ItemCollection<T> : IEnumerable<T>, 
    IEnumerable 
where T : NamedItem
generic<typename T>
where T : NamedItem 
public ref class ItemCollection : IEnumerable<T>, 
    IEnumerable
type ItemCollection<'T when 'T : NamedItem> =  
    class 
        interface IEnumerable<'T>
        interface IEnumerable 
    end
JScript does not support generic types or methods.

Type Parameters

  • T

The ItemCollection<T> type exposes the following members.

Constructors

  Name Description
Public method ItemCollection<T>

Top

Properties

  Name Description
Public property Count
Public property Item

Top

Methods

  Name Description
Public method Add(Object) Add an item to the collection. This method is required for serialization.
Public method Add(T) Add an item to the collection. Throws if a field that has the same name has already been added.
Public method AddRange Add a collection of items. If this throws the collection will have all the values added up to when it threw.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetEnumerator
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Remove
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method TryGetValue

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IEnumerable.GetEnumerator

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.TeamFoundation.Warehouse Namespace