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
    System.Object
    System.Collections.ObjectModel.Collection<T>
    ItemCollection<T>
    InputLanguagePairCollection
    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
    Inherited Members
    System.Collections.ObjectModel.Collection<T>.Add(T)
    System.Collections.ObjectModel.Collection<T>.Clear()
    System.Collections.ObjectModel.Collection<T>.CopyTo(T[], System.Int32)
    System.Collections.ObjectModel.Collection<T>.Contains(T)
    System.Collections.ObjectModel.Collection<T>.GetEnumerator()
    System.Collections.ObjectModel.Collection<T>.IndexOf(T)
    System.Collections.ObjectModel.Collection<T>.Insert(System.Int32, T)
    System.Collections.ObjectModel.Collection<T>.Remove(T)
    System.Collections.ObjectModel.Collection<T>.RemoveAt(System.Int32)
    System.Collections.ObjectModel.Collection<T>.System.Collections.IEnumerable.GetEnumerator()
    System.Collections.ObjectModel.Collection<T>.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
    System.Collections.ObjectModel.Collection<T>.System.Collections.IList.get_Item(System.Int32)
    System.Collections.ObjectModel.Collection<T>.System.Collections.IList.set_Item(System.Int32, System.Object)
    System.Collections.ObjectModel.Collection<T>.System.Collections.IList.Add(System.Object)
    System.Collections.ObjectModel.Collection<T>.System.Collections.IList.Contains(System.Object)
    System.Collections.ObjectModel.Collection<T>.System.Collections.IList.IndexOf(System.Object)
    System.Collections.ObjectModel.Collection<T>.System.Collections.IList.Insert(System.Int32, System.Object)
    System.Collections.ObjectModel.Collection<T>.System.Collections.IList.Remove(System.Object)
    System.Collections.ObjectModel.Collection<T>.Count
    System.Collections.ObjectModel.Collection<T>.Items
    System.Collections.ObjectModel.Collection<T>.Item[System.Int32]
    System.Collections.ObjectModel.Collection<T>.System.Collections.Generic.ICollection<T>.IsReadOnly
    System.Collections.ObjectModel.Collection<T>.System.Collections.ICollection.IsSynchronized
    System.Collections.ObjectModel.Collection<T>.System.Collections.ICollection.SyncRoot
    System.Collections.ObjectModel.Collection<T>.System.Collections.IList.Item[System.Int32]
    System.Collections.ObjectModel.Collection<T>.System.Collections.IList.IsReadOnly
    System.Collections.ObjectModel.Collection<T>.System.Collections.IList.IsFixedSize
    System.Object.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    System.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
    System.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
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.Object.Equals(System.Object)

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.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
    System.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
    System.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
    System.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
    System.EventHandler<ItemCollectionAddedEventArgs<T>>

    ItemRemoved

    ItemRemoved event is fired when an item is removed.

    Declaration
    public event EventHandler<ItemCollectionRemovedEventArgs<T>> ItemRemoved
    Event Type
    Type Description
    System.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

    On this page

    • 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