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[], int)
    Collection<T>.Contains(T)
    Collection<T>.GetEnumerator()
    Collection<T>.IndexOf(T)
    Collection<T>.Insert(int, T)
    Collection<T>.Remove(T)
    Collection<T>.RemoveAt(int)
    Collection<T>.Count
    Collection<T>.Items
    Collection<T>.this[int]
    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
    bool

    Methods

    ClearItems()

    Clears the items.

    Declaration
    protected override void ClearItems()
    Overrides
    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
    bool
    Overrides
    object.Equals(object)

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    object.GetHashCode()

    InsertItem(int, T)

    Inserts the given item at the given index.

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

    index

    T item

    item

    Overrides
    Collection<T>.InsertItem(int, T)

    RemoveItem(int)

    Removes the item at the given index.

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

    index

    Overrides
    Collection<T>.RemoveItem(int)

    SetItem(int, T)

    Sets the item at the given index.

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

    index

    T item

    item

    Overrides
    Collection<T>.SetItem(int, 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

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