AdvisableKeyedCollection<TKey, TItem> Class |
PostSharp.Patterns.DynamicAdvising.DynamicallyAdvisableObject
PostSharp.Patterns.Collections.AdvisableCollection<TItem>
PostSharp.Patterns.Collections.AdvisableKeyedCollection<TKey, TItem>
Namespace: PostSharp.Patterns.Collections
Assembly: PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 2023.0.3.0 (2023.0.3.0)
[SerializableAttribute] public abstract class AdvisableKeyedCollection<TKey, TItem> : AdvisableCollection<TItem>
Type Parameters
- TKey
- The type of keys in the collection.
- TItem
- The type of values in the collection.
The AdvisableKeyedCollection<TKey, TItem> type exposes the following members.
Name | Description | |
---|---|---|
AdvisableKeyedCollection<TKey, TItem>() |
Initializes a new instance of the AdvisableKeyedCollection<TKey, TItem> class that is empty and has the default initial capacity.
| |
AdvisableKeyedCollection<TKey, TItem>(Int32) |
Initializes a new instance of the AdvisableKeyedCollection<TKey, TItem> class that is empty and has a specified initial capacity.
| |
AdvisableKeyedCollection<TKey, TItem>(Int32, IEqualityComparer<TKey>) |
Initializes a new instance of the AdvisableKeyedCollection<TKey, TItem> class that has a specified initial capacity and a given equality comparer and uses the specified equality comparer.
| |
AdvisableKeyedCollection<TKey, TItem>(SerializationInfo, StreamingContext) |
Deserialization constructor.
|
Name | Description | |
---|---|---|
Comparer |
Gets the generic equality comparer that is used to determine equality of keys in the collection.
| |
Count | Gets the number of elements contained in the ICollection<T>. (Inherited from AdvisableCollection<T>.) | |
IsReadOnly | Gets a value indicating whether the ICollection<T> is read-only. (Inherited from AdvisableCollection<T>.) | |
Item[Int32] | Gets or sets the element at the specified index. (Inherited from AdvisableCollection<T>.) | |
Item[TKey] |
Gets or sets the element with the specified key.
|
Name | Description | |
---|---|---|
Add | Adds an item to the ICollection<T>. (Inherited from AdvisableCollection<T>.) | |
AddRange |
Adds the elements of the specified collection to the end of the AdvisableCollection<T>.
(Inherited from AdvisableCollection<T>.) | |
Clear | Removes all items from the ICollection<T>. (Inherited from AdvisableCollection<T>.) | |
ClearItems |
Removes all elements from the underlying collection.
(Overrides AdvisableCollection<T>.ClearItems().) | |
Contains(T) | Determines whether the ICollection<T> contains a specific value. (Inherited from AdvisableCollection<T>.) | |
Contains(TKey) |
Determines whether the collection contains an element with the specified key.
| |
CopyTo | (Inherited from AdvisableCollection<T>.) | |
ExecuteWithAdvices<TResult, TAction> |
Executes an action wrapped by all custom advices added to the current object.
(Inherited from DynamicallyAdvisableObject.) | |
GetAdviceEnumerator |
Gets an AdviceEnumerator<T> for the ICollectionDynamicAdvice<T> interface.
(Inherited from AdvisableCollection<T>.) | |
GetCount |
Gets the number of elements in the underlying collection.
(Inherited from AdvisableCollection<T>.) | |
GetEnumerator |
Returns an enumerator that iterates through the AdvisableCollection<T>.
(Inherited from AdvisableCollection<T>.) | |
GetItem |
Gets the element at the specified index of the underlying collection.
(Inherited from AdvisableCollection<T>.) | |
GetKeyForItem |
Extracts the key from the specified element.
| |
GetObjectData | Populates a SerializationInfo with the data needed to serialize the target object. (Overrides AdvisableCollection<T>.GetObjectData(SerializationInfo, StreamingContext).) | |
GetRange |
Creates a shallow copy of a range of elements in the source AdvisableCollection<T>.
(Inherited from AdvisableCollection<T>.) | |
IndexOf | Determines the index of a specific item in the IList<T>. (Inherited from AdvisableCollection<T>.) | |
IndexOfItem |
Searches for the specified object and returns the zero-based index of the first occurrence within the entire underlying collection.
(Overrides AdvisableCollection<T>.IndexOfItem(T).) | |
InitializeAdvices |
Initializes the list of dynamic advices.
(Inherited from DynamicallyAdvisableObject.) | |
Insert | Inserts an item to the IList<T> at the specified index. (Inherited from AdvisableCollection<T>.) | |
InsertItem |
Inserts an element into the underlying collection at the specified index.
(Overrides AdvisableCollection<T>.InsertItem(Int32, T).) | |
InsertItems |
Inserts elements into the underlying collection at the specified index.
(Overrides AdvisableCollection<T>.InsertItems(Int32, T[]).) | |
InsertRange |
Inserts the elements of a collection into the AdvisableCollection<T> at the specified index.
(Inherited from AdvisableCollection<T>.) | |
Move |
Moved the element at the specified index to another index.
(Inherited from AdvisableCollection<T>.) | |
MoveItem |
Moves the element at the specified index to another index in the underlying collection.
(Overrides AdvisableCollection<T>.MoveItem(T, Int32, Int32).) | |
OnDeserialization | Runs when the entire object graph has been deserialized. (Inherited from AdvisableCollection<T>.) | |
RaiseEvents |
Raised the events that have been buffered.
(Inherited from AdvisableCollection<T>.) | |
Remove | Removes the first occurrence of a specific object from the ICollection<T>. (Inherited from AdvisableCollection<T>.) | |
RemoveAt | Removes the IList<T> item at the specified index. (Inherited from AdvisableCollection<T>.) | |
RemoveItem |
Removes the element at the specified index of the underlying collection.
(Overrides AdvisableCollection<T>.RemoveItem(Int32).) | |
RemoveItems |
Removes the specified number of elements starting at the specified index of the underlying collection.
(Overrides AdvisableCollection<T>.RemoveItems(Int32, Int32).) | |
RemoveRange |
Removes a range of elements from the AdvisableCollection<T>.
(Inherited from AdvisableCollection<T>.) | |
SetItem |
Replaces the element at the specified index of the underlying collection.
(Overrides AdvisableCollection<T>.SetItem(Int32, T).) | |
ToArray |
Creates an array from the current AdvisableCollection<T>.
(Inherited from AdvisableCollection<T>.) | |
TryGetValue |
Tries to get the element with the specified key.
|
Name | Description | |
---|---|---|
CollectionChanged | Occurs when the collection changes. (Inherited from AdvisableCollection<T>.) | |
PropertyChanged |
Event raised when the value of a property of the current object changes.
(Inherited from AdvisableCollection<T>.) |
The API of this class is compatible with the KeyedCollection<TKey, TItem> class.
To learn how to extend this class, see the AdvisableCollection<T> class documentation.