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.
Implements
Inherited Members
Namespace: SdlSdl.LanguagePlatformTranslationMemoryApiUpgrade
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
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
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int |
Overrides
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
RemoveItem(int)
Removes the item at the given index.
Declaration
protected override void RemoveItem(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | index |
Overrides
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
Events
ItemAdded
ItemAdded event is fired when an item is added.
Declaration
public event EventHandler<ItemCollectionAddedEventArgs<T>> ItemAdded
Event Type
Type | Description |
---|---|
EventHandlerItemCollectionAddedEventArgs |
ItemRemoved
ItemRemoved event is fired when an item is removed.
Declaration
public event EventHandler<ItemCollectionRemovedEventArgs<T>> ItemRemoved
Event Type
Type | Description |
---|---|
EventHandlerItemCollectionRemovedEventArgs |