Class ParentCollection<TParent, TKey, TItem>
Inheritance
ParentCollection<TParent, TKey, TItem>
Namespace: Ludiq
Syntax
public abstract class ParentCollection<TParent, TKey, TItem> : KeyedCollection<TKey, TItem>, IList<TItem>, IList, IReadOnlyList<TItem>, IReadOnlyCollection<TItem>, IKeyedCollection<TKey, TItem>, ICollection, INotifyCollectionChangedPausable, INotifyCollectionChanged, INotifyCollectionItemPropertyChanged, IBulkCollection<TItem>, ICollection<TItem>, IEnumerable<TItem>, IEnumerable where TParent : class
Type Parameters
Name |
Description |
TParent |
|
TKey |
|
TItem |
|
Constructors
ParentCollection(TParent)
Declaration
protected ParentCollection(TParent parent)
Parameters
Type |
Name |
Description |
TParent |
parent |
|
Properties
parent
Declaration
public TParent parent { get; }
Property Value
Methods
Add(IEnumerable<TItem>)
Declaration
public void Add(IEnumerable<TItem> items)
Parameters
Implements
AfterAdd(TItem)
Declaration
protected virtual void AfterAdd(TItem item)
Parameters
Type |
Name |
Description |
TItem |
item |
|
AfterRemove(TItem)
Declaration
protected virtual void AfterRemove(TItem item)
Parameters
Type |
Name |
Description |
TItem |
item |
|
AfterSet(TItem, TItem)
Declaration
protected virtual void AfterSet(TItem previous, TItem item)
Parameters
Type |
Name |
Description |
TItem |
previous |
|
TItem |
item |
|
BeforeAdd(TItem)
Declaration
protected virtual void BeforeAdd(TItem item)
Parameters
Type |
Name |
Description |
TItem |
item |
|
BeforeRemove(TItem)
Declaration
protected virtual void BeforeRemove(TItem item)
Parameters
Type |
Name |
Description |
TItem |
item |
|
BeforeSet(TItem, TItem)
Declaration
protected virtual void BeforeSet(TItem previous, TItem item)
Parameters
Type |
Name |
Description |
TItem |
previous |
|
TItem |
item |
|
ClearItems()
Declaration
protected override sealed void ClearItems()
Overrides
System.Collections.ObjectModel.KeyedCollection<TKey, TItem>.ClearItems()
EnsureItemValid(TItem)
Declaration
protected virtual void EnsureItemValid(TItem item)
Parameters
Type |
Name |
Description |
TItem |
item |
|
InsertItem(Int32, TItem)
Declaration
protected override sealed void InsertItem(int index, TItem item)
Parameters
Type |
Name |
Description |
Int32 |
index |
|
TItem |
item |
|
Overrides
System.Collections.ObjectModel.KeyedCollection<TKey, TItem>.InsertItem(System.Int32, TItem)
OnCollectionChanged(Object, NotifyCollectionChangedEventArgs)
Declaration
protected virtual void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs args)
Parameters
Type |
Name |
Description |
Object |
sender |
|
NotifyCollectionChangedEventArgs |
args |
|
OnItemPropertyChanged(Object, PropertyChangedEventArgs)
Declaration
protected virtual void OnItemPropertyChanged(object sender, PropertyChangedEventArgs args)
Parameters
Type |
Name |
Description |
Object |
sender |
|
PropertyChangedEventArgs |
args |
|
PauseCollectionChangeNotifications()
Declaration
public void PauseCollectionChangeNotifications()
Implements
RawInsertItem(Int32, TItem)
Declaration
protected virtual void RawInsertItem(int index, TItem item)
Parameters
Type |
Name |
Description |
Int32 |
index |
|
TItem |
item |
|
RawRemoveItem(Int32, TItem)
Declaration
protected virtual void RawRemoveItem(int index, TItem item)
Parameters
Type |
Name |
Description |
Int32 |
index |
|
TItem |
item |
|
RawSetItem(Int32, TItem, TItem)
Declaration
protected virtual void RawSetItem(int index, TItem oldItem, TItem newItem)
Parameters
Type |
Name |
Description |
Int32 |
index |
|
TItem |
oldItem |
|
TItem |
newItem |
|
RemoveItem(Int32)
Declaration
protected override sealed void RemoveItem(int index)
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Overrides
System.Collections.ObjectModel.KeyedCollection<TKey, TItem>.RemoveItem(System.Int32)
Replace(IEnumerable<TItem>)
Declaration
public void Replace(IEnumerable<TItem> items)
Parameters
Implements
ResumeCollectionChangeNotifications(Boolean)
Declaration
public bool ResumeCollectionChangeNotifications(bool notify)
Parameters
Type |
Name |
Description |
Boolean |
notify |
|
Returns
Implements
SetItem(Int32, TItem)
Declaration
protected override sealed void SetItem(int index, TItem item)
Parameters
Type |
Name |
Description |
Int32 |
index |
|
TItem |
item |
|
Overrides
System.Collections.ObjectModel.KeyedCollection<TKey, TItem>.SetItem(System.Int32, TItem)
UpdateItemKey(TItem, ref TKey, TKey)
Declaration
public void UpdateItemKey(TItem item, ref TKey key, TKey newKey)
Parameters
Type |
Name |
Description |
TItem |
item |
|
TKey |
key |
|
TKey |
newKey |
|
Events
CollectionChanged
Declaration
public event NotifyCollectionChangedEventHandler CollectionChanged
Event Type
Type |
Description |
NotifyCollectionChangedEventHandler |
|
ItemPropertyChanged
Declaration
public event PropertyChangedEventHandler ItemPropertyChanged
Event Type
Type |
Description |
PropertyChangedEventHandler |
|
Implements
Extension Methods