Show / Hide Table of Contents

Class ObservableDictionaryWrap<TKey, TValue>

Wraps a dictionary to provide property and collection changed notification events.

Inheritance
object
NotifyPropertyChangeBase
NotifyPropertyChanged
ObservableWrapBase
ObservableWrap<KeyValuePair<TKey, TValue>, IDictionary<TKey, TValue>>
ObservableDictionaryWrap<TKey, TValue>
Implements
INotifyPropertyChangeBase
IRefreshable
INotifyPropertyChanged
INotifyCollectionChanged
IDictionary<TKey, TValue>
ICollection<KeyValuePair<TKey, TValue>>
IEnumerable<KeyValuePair<TKey, TValue>>
IEnumerable
Inherited Members
ObservableWrap<KeyValuePair<TKey, TValue>, IDictionary<TKey, TValue>>.UnderlyingCollection
ObservableWrap<KeyValuePair<TKey, TValue>, IDictionary<TKey, TValue>>.Count
ObservableWrap<KeyValuePair<TKey, TValue>, IDictionary<TKey, TValue>>.IsReadOnly
ObservableWrap<KeyValuePair<TKey, TValue>, IDictionary<TKey, TValue>>.Add(KeyValuePair<TKey, TValue>)
ObservableWrap<KeyValuePair<TKey, TValue>, IDictionary<TKey, TValue>>.Clear()
ObservableWrap<KeyValuePair<TKey, TValue>, IDictionary<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[], int)
ObservableWrap<KeyValuePair<TKey, TValue>, IDictionary<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue>)
ObservableWrap<KeyValuePair<TKey, TValue>, IDictionary<TKey, TValue>>.GetEnumerator()
ObservableWrap<KeyValuePair<TKey, TValue>, IDictionary<TKey, TValue>>.OnGetEnumerator()
ObservableWrap<KeyValuePair<TKey, TValue>, IDictionary<TKey, TValue>>.Refresh()
ObservableWrap<KeyValuePair<TKey, TValue>, IDictionary<TKey, TValue>>.Substitute(IDictionary<TKey, TValue>)
ObservableWrap<KeyValuePair<TKey, TValue>, IDictionary<TKey, TValue>>.Replace(IDictionary<TKey, TValue>)
ObservableWrap<KeyValuePair<TKey, TValue>, IDictionary<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue>)
ObservableWrapBase.CollectionChanged
ObservableWrapBase.RaiseCollectionChanged(NotifyCollectionChangedEventArgs)
ObservableWrapBase.GetEnumerator()
ObservableWrapBase.OnGetEnumerator()
ObservableWrapBase.IndexOf(object)
ObservableWrapBase.RefreshItem(object)
ObservableWrapBase.Contains(object)
NotifyPropertyChanged.PropertyChanged
NotifyPropertyChanged.Notify(params string[])
NotifyPropertyChanged.Notify(string)
NotifyPropertyChanged.RaisePropertyChangeEvent(in string, in PropertyChangeNotificationType)
NotifyPropertyChanged.OnDoChange<T>(ref T, T, string)
NotifyPropertyChangeBase.OnInitialize(NotifyPropertyChangeBase.IPropertyBroadcastSetup)
NotifyPropertyChangeBase.Refresh()
NotifyPropertyChangeBase.Subscribe(PropertyInfo, PropertyChangeObserver)
NotifyPropertyChangeBase.Subscribe(PropertyChangeObserver)
NotifyPropertyChangeBase.Subscribe(Expression<Func<object>>, PropertyChangeObserver)
NotifyPropertyChangeBase.Unsubscribe(PropertyChangeObserver)
NotifyPropertyChangeBase.Unsubscribe(PropertyInfo)
NotifyPropertyChangeBase.Unsubscribe(Expression<Func<object>>)
NotifyPropertyChangeBase.Change<T>(ref T, T, string)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: TheXDS.MCART.Types
Assembly: MCART.Mvvm.dll
Syntax
public class ObservableDictionaryWrap<TKey, TValue> : ObservableWrap<KeyValuePair<TKey, TValue>, IDictionary<TKey, TValue>>, INotifyPropertyChangeBase, IRefreshable, INotifyPropertyChanged, INotifyCollectionChanged, IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable where TKey : notnull
Type Parameters
Name Description
TKey

Type of the dictionary keys.

TValue

Type of elements contained in the dictionary.

Constructors

| Edit this page View Source

ObservableDictionaryWrap()

Initializes a new instance of the ObservableDictionaryWrap<TKey, TValue> class.

Declaration
public ObservableDictionaryWrap()
| Edit this page View Source

ObservableDictionaryWrap(IDictionary<TKey, TValue>)

Initializes a new instance of the ObservableDictionaryWrap<TKey, TValue> class.

Declaration
public ObservableDictionaryWrap(IDictionary<TKey, TValue> collection)
Parameters
Type Name Description
IDictionary<TKey, TValue> collection

Collection to use as the underlying dictionary.

Properties

| Edit this page View Source

this[TKey]

Gets or sets the value at the specified key in the dictionary.

Declaration
public TValue this[TKey key] { get; set; }
Parameters
Type Name Description
TKey key

Key of the value to get or set.

Property Value
Type Description
TValue

The value found at the specified key in the dictionary.

| Edit this page View Source

Keys

Gets a collection containing all keys in the dictionary.

Declaration
public ICollection<TKey> Keys { get; }
Property Value
Type Description
ICollection<TKey>
| Edit this page View Source

Values

Gets a collection containing all values in the dictionary.

Declaration
public ICollection<TValue> Values { get; }
Property Value
Type Description
ICollection<TValue>

Methods

| Edit this page View Source

Add(TKey, TValue)

Adds a value to this dictionary with the specified key.

Declaration
public void Add(TKey key, TValue value)
Parameters
Type Name Description
TKey key

Key to use.

TValue value

Value to add to the dictionary.

| Edit this page View Source

ContainsKey(TKey)

Determines whether the specified key exists in the dictionary.

Declaration
public bool ContainsKey(TKey key)
Parameters
Type Name Description
TKey key

Key to look for in the dictionary.

Returns
Type Description
bool

true if the key exists in the dictionary; otherwise false.

| Edit this page View Source

Remove(TKey)

Removes the element with the specified key from the dictionary.

Declaration
public bool Remove(TKey key)
Parameters
Type Name Description
TKey key

Key to remove.

Returns
Type Description
bool

true if the key was successfully removed from the dictionary; false if the key did not exist in the dictionary or if another error occurred while attempting the operation.

| Edit this page View Source

TryGetValue(TKey, out TValue)

Attempts to get a value from the dictionary.

Declaration
public bool TryGetValue(TKey key, out TValue value)
Parameters
Type Name Description
TKey key

Key of the value to get.

TValue value

Output parameter. Value obtained from the dictionary at the specified key.

Returns
Type Description
bool

true if the value was obtained from the dictionary successfully; false if the key did not exist in the dictionary or if another error occurred while obtaining the value.

Implements

INotifyPropertyChangeBase
IRefreshable
INotifyPropertyChanged
INotifyCollectionChanged
IDictionary<TKey, TValue>
ICollection<T>
IEnumerable<T>
IEnumerable

Extension Methods

CollectionExtensions.AddRangeAsync<T>(ICollection<T>, IAsyncEnumerable<T>)
CollectionExtensions.AddRange<T>(ICollection<T>, IEnumerable<T>)
CollectionExtensions.PopFirst<T>(ICollection<T>)
CollectionExtensions.Pop<T>(ICollection<T>)
CollectionExtensions.Push<T>(ICollection<T>)
CollectionExtensions.Push<TItem, TCollection>(ICollection<TCollection>)
CollectionExtensions.Push<TItem, TCollection>(ICollection<TCollection>, TItem)
CollectionExtensions.RemoveAll<T>(ICollection<T>)
CollectionExtensions.RemoveAll<T>(ICollection<T>, in Action<T>)
CollectionExtensions.RemoveAll<T>(ICollection<T>, in Predicate<T>)
CollectionExtensions.RemoveAll<T>(ICollection<T>, in Predicate<T>?, in Action<T>?)
CollectionExtensions.RemoveOf<TItem, TRemove>(ICollection<TItem>)
MvvmCollectionExtensions.ToObservable<T>(ICollection<T>)
DictionaryExtensions.Pop<TKey, TValue>(IDictionary<TKey, TValue>, TKey, out TValue)
DictionaryExtensions.Push<TKey, TValue>(IDictionary<TKey, TValue>, TKey, TValue)
CollectionHelpers.WithIndex<T>(IEnumerable<T>)
EnumerableExtensions.AreAllEqual<T>(IEnumerable<T>)
EnumerableExtensions.AreAllEqual<T, TProp>(IEnumerable<T>, Func<T, TProp>)
EnumerableExtensions.Copy<T>(IEnumerable<T>)
EnumerableExtensions.ExceptFor<T>(IEnumerable<T>, params T[])
EnumerableExtensions.FindIndexOf<T>(IEnumerable<T>, T)
EnumerableExtensions.FirstOf<T>(IEnumerable<T>, Type)
EnumerableExtensions.Interleave<T>(IEnumerable<T>, IEnumerable<T>)
EnumerableExtensions.IsPropertyEqual<T>(IEnumerable<T>, Func<T, object>)
EnumerableExtensions.IsQuorum<T>(IEnumerable<T>, int, out T)
EnumerableExtensions.NonDefaults<T>(IEnumerable<T?>)
EnumerableExtensions.OfType<T>(IEnumerable<T>, Type)
EnumerableExtensions.OrNull<T>(IEnumerable<T>)
EnumerableExtensions.PickAsync<T>(IEnumerable<T>)
EnumerableExtensions.Pick<T>(IEnumerable<T>)
EnumerableExtensions.Pick<T>(IEnumerable<T>, in Random)
EnumerableExtensions.Quorum<T>(IEnumerable<T>, int)
EnumerableExtensions.Range<T>(IEnumerable<T>, int, int)
EnumerableExtensions.Rotate<T>(IEnumerable<T>, int)
EnumerableExtensions.SelectAsync<TIn, TOut>(IEnumerable<TIn>, Func<TIn, Task<TOut>>)
EnumerableExtensions.Shift<T>(IEnumerable<T>, int)
EnumerableExtensions.Shuffled<T>(IEnumerable<T>)
EnumerableExtensions.Shuffled<T>(IEnumerable<T>, in int)
EnumerableExtensions.Shuffled<T>(IEnumerable<T>, in int, in int)
EnumerableExtensions.Shuffled<T>(IEnumerable<T>, in int, in int, in int, in Random)
EnumerableExtensions.Slice<T>(IEnumerable<T>, int)
EnumerableExtensions.ToExtendedListAsync<T>(IEnumerable<T>)
EnumerableExtensions.ToExtendedList<T>(IEnumerable<T>)
EnumerableExtensions.ToListAsync<T>(IEnumerable<T>)
EnumerableExtensions.YieldAsync<T>(IEnumerable<T>, Func<T, Task>)
CollectionHelpers.ToTypes(IEnumerable)
EnumerableExtensions.Contains(IEnumerable, object?)
EnumerableExtensions.ContainsAll(IEnumerable, IEnumerable)
EnumerableExtensions.ContainsAll(IEnumerable, params object?[])
EnumerableExtensions.ContainsAny(IEnumerable, IEnumerable)
EnumerableExtensions.ContainsAny(IEnumerable, params object?[])
EnumerableExtensions.Count(IEnumerable)
EnumerableExtensions.FirstOf<T>(IEnumerable)
EnumerableExtensions.GroupByType(IEnumerable)
EnumerableExtensions.IsAnyOf(IEnumerable, Type)
EnumerableExtensions.IsAnyOf<T>(IEnumerable)
EnumerableExtensions.ItemsEqual(IEnumerable, IEnumerable)
EnumerableExtensions.NotNull(IEnumerable?)
EnumerableExtensions.NullCount(IEnumerable)
EnumerableExtensions.ToGeneric(IEnumerable)
Objects.ShallowCopyTo(object, object, Type)
ObjectExtensions.FieldsOf<T>(object)
ObjectExtensions.GetAttribute<T>(object)
ObjectExtensions.GetAttributes<T>(object)
ObjectExtensions.HasAttrValue<TAttribute, TValue>(object, out TValue)
ObjectExtensions.HasAttribute<T>(object)
ObjectExtensions.HasAttribute<T>(object, out T?)
ObjectExtensions.HasAttributes<T>(object, out IEnumerable<T>?)
ObjectExtensions.Is(object?, object?)
ObjectExtensions.IsEither(object, IEnumerable)
ObjectExtensions.IsEither(object, params object[])
ObjectExtensions.IsNeither(object, IEnumerable)
ObjectExtensions.IsNeither(object, params object[])
ObjectExtensions.IsNot(object?, object?)
ObjectExtensions.PropertiesOf<T>(object)
ObjectExtensions.WhichAre(object, IEnumerable<object>)
ObjectExtensions.WhichAre(object, params object[])
Common.IfNotNull<T>(T?, Action<T>)
Objects.Itself<T>(T)
Objects.ShallowClone<T>(T)
Objects.ShallowCopyTo<T>(T, T)
ObservingCommandBuilder.Create<T>(T, Action)
ObservingCommandBuilder.Create<T>(T, Action<object?>)
ObservingCommandBuilder.Create<T>(T, Func<object?, Task>)
ObservingCommandBuilder.Create<T>(T, Func<Task>)
ObservingCommandBuilder.Create<T, TParam>(T, Action<TParam>)
ObservingCommandBuilder.Create<T, TParam>(T, Func<TParam, Task>)
CollectionExtensions.PushInto<TItem, TCollection>(TItem, ICollection<TCollection>)
DictionaryExtensions.PushInto<TKey, TValue>(TValue, TKey, IDictionary<TKey, TValue>)
EnumerableExtensions.Locked<T>(T, Action<T>)
EnumerableExtensions.Locked<T, TResult>(T, Func<T, TResult>)
NotifyPropertyChangeBaseExtensions.Subscribe<T>(T, Expression<Func<T, object?>>, PropertyChangeObserver)
NotifyPropertyChangeBaseExtensions.Unsubscribe<T>(T, Expression<Func<T, object?>>)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX