Search Results for

    Show / Hide Table of Contents

    Class ItemCollection<T>

    ItemCollection class represents an item collection; an item collection is a list that fires events when an item is added or removed.

    Inheritance
    Object
    Collection<T>
    ItemCollection<T>
    InputLanguagePairCollection
    Implements
    IList
    ICollection
    IReadOnlyList<T>
    IReadOnlyCollection<T>
    IItemCollection<T>
    IList<T>
    ICollection<T>
    IEnumerable<T>
    IEnumerable
    Inherited Members
    Collection<T>.Add(T)
    Collection<T>.Clear()
    Collection<T>.CopyTo(T[], Int32)
    Collection<T>.Contains(T)
    Collection<T>.GetEnumerator()
    Collection<T>.IndexOf(T)
    Collection<T>.Insert(Int32, T)
    Collection<T>.Remove(T)
    Collection<T>.RemoveAt(Int32)
    Collection<T>.IEnumerable.GetEnumerator()
    Collection<T>.ICollection.CopyTo(Array, Int32)
    Collection<T>.IList.get_Item(Int32)
    Collection<T>.IList.set_Item(Int32, Object)
    Collection<T>.IList.Add(Object)
    Collection<T>.IList.Contains(Object)
    Collection<T>.IList.IndexOf(Object)
    Collection<T>.IList.Insert(Int32, Object)
    Collection<T>.IList.Remove(Object)
    Collection<T>.Count
    Collection<T>.Items
    Collection<T>.Item[Int32]
    Collection<T>.ICollection<T>.IsReadOnly
    Collection<T>.ICollection.IsSynchronized
    Collection<T>.ICollection.SyncRoot
    Collection<T>.IList.Item[Int32]
    Collection<T>.IList.IsReadOnly
    Collection<T>.IList.IsFixedSize
    Object.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Sdl.LanguagePlatform.TranslationMemoryApi.Upgrade
    Assembly: Sdl.LanguagePlatform.TranslationMemoryApi.dll
    Syntax
    public class ItemCollection<T> : Collection<T>, IList, ICollection, IReadOnlyList<T>, IReadOnlyCollection<T>, IItemCollection<T>, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable
    Type Parameters
    Name Description
    T

    item type

    Constructors

    ItemCollection()

    Declaration
    public ItemCollection()

    Fields

    _suspendAddedRemovedEvents

    Declaration
    protected bool _suspendAddedRemovedEvents
    Field Value
    Type Description
    Boolean

    Methods

    ClearItems()

    Clears the items.

    Declaration
    protected override void ClearItems()
    Overrides
    System.Collections.ObjectModel.Collection<T>.ClearItems()

    Equals(Object)

    Override to check if two objects have the same values

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean
    Overrides
    System.Object.Equals(System.Object)

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    System.Object.GetHashCode()

    InsertItem(Int32, T)

    Inserts the given item at the given index.

    Declaration
    protected override void InsertItem(int index, T item)
    Parameters
    Type Name Description
    Int32 index

    index

    T item

    item

    Overrides
    System.Collections.ObjectModel.Collection<T>.InsertItem(System.Int32, T)

    RemoveItem(Int32)

    Removes the item at the given index.

    Declaration
    protected override void RemoveItem(int index)
    Parameters
    Type Name Description
    Int32 index

    index

    Overrides
    System.Collections.ObjectModel.Collection<T>.RemoveItem(System.Int32)

    SetItem(Int32, T)

    Sets the item at the given index.

    Declaration
    protected override void SetItem(int index, T item)
    Parameters
    Type Name Description
    Int32 index

    index

    T item

    item

    Overrides
    System.Collections.ObjectModel.Collection<T>.SetItem(System.Int32, T)

    Events

    ItemAdded

    ItemAdded event is fired when an item is added.

    Declaration
    public event EventHandler<ItemCollectionAddedEventArgs<T>> ItemAdded
    Event Type
    Type Description
    EventHandler<ItemCollectionAddedEventArgs<T>>

    ItemRemoved

    ItemRemoved event is fired when an item is removed.

    Declaration
    public event EventHandler<ItemCollectionRemovedEventArgs<T>> ItemRemoved
    Event Type
    Type Description
    EventHandler<ItemCollectionRemovedEventArgs<T>>

    Implements

    System.Collections.IList
    System.Collections.ICollection
    System.Collections.Generic.IReadOnlyList<T>
    System.Collections.Generic.IReadOnlyCollection<T>
    IItemCollection<T>
    System.Collections.Generic.IList<T>
    System.Collections.Generic.ICollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    In this article
    • Constructors
      • ItemCollection()
    • Fields
      • _suspendAddedRemovedEvents
    • Methods
      • ClearItems()
      • Equals(Object)
      • GetHashCode()
      • InsertItem(Int32, T)
      • RemoveItem(Int32)
      • SetItem(Int32, T)
    • Events
      • ItemAdded
      • ItemRemoved
    • Implements
    Back to top Generated by DocFX