Show / Hide Table of Contents

Class ControllerDictionary<TKey, TValue>

Inheritance
System.Object
ThreadSafeDictionary<TKey, TValue>
ControllerDictionary<TKey, TValue>
Implements
System.Collections.Generic.IDictionary<TKey, TValue>
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>>
System.Collections.IDictionary
System.Collections.ICollection
ISnapshotable<System.Collections.Generic.KeyValuePair<TKey, TValue>>
ISnapshotable
ITrackedControllerEnumerable
ITrackedEnumerable
System.Collections.IEnumerable
Inherited Members
ThreadSafeDictionary<TKey, TValue>.Contains(KeyValuePair<TKey, TValue>)
ThreadSafeDictionary<TKey, TValue>.ContainsKey(TKey)
ThreadSafeDictionary<TKey, TValue>.Set(Dictionary<TKey, TValue>)
ThreadSafeDictionary<TKey, TValue>.Set(ImmutableDictionary<TKey, TValue>)
ThreadSafeDictionary<TKey, TValue>.ContainsValue(TValue)
ThreadSafeDictionary<TKey, TValue>.TryGetKey(TKey, TKey)
ThreadSafeDictionary<TKey, TValue>.TryGetValue(TKey, TValue)
ThreadSafeDictionary<TKey, TValue>.GetOrDefault(TKey)
ThreadSafeDictionary<TKey, TValue>.GetOr(TKey, TValue)
ThreadSafeDictionary<TKey, TValue>.Add(TKey, TValue)
ThreadSafeDictionary<TKey, TValue>.Add(KeyValuePair<TKey, TValue>)
ThreadSafeDictionary<TKey, TValue>.GetOrAdd(TKey, Func<TKey, TValue>)
ThreadSafeDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>>)
ThreadSafeDictionary<TKey, TValue>.TryAdd(TKey, TValue)
ThreadSafeDictionary<TKey, TValue>.AddOrUpdate(TKey, TValue, Func<TKey, TValue, TValue>)
ThreadSafeDictionary<TKey, TValue>.AddOrUpdate(TKey, Func<TValue>, Func<TValue, TValue>)
ThreadSafeDictionary<TKey, TValue>.TryUpdate(TKey, TValue, TValue)
ThreadSafeDictionary<TKey, TValue>.Remove(TKey)
ThreadSafeDictionary<TKey, TValue>.RemoveRange(IEnumerable<TKey>)
ThreadSafeDictionary<TKey, TValue>.TryRemove(TKey, TValue)
ThreadSafeDictionary<TKey, TValue>.TryRemove(TKey)
ThreadSafeDictionary<TKey, TValue>.TryRemove(KeyValuePair<TKey, TValue>)
ThreadSafeDictionary<TKey, TValue>.SetItem(TKey, TValue)
ThreadSafeDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>>)
ThreadSafeDictionary<TKey, TValue>.Clear()
ThreadSafeDictionary<TKey, TValue>.GetSnapshotAndClear()
ThreadSafeDictionary<TKey, TValue>.GetOrAdd(TKey, TValue)
ThreadSafeDictionary<TKey, TValue>.GetOrAdd(TKey, Func<TValue>)
ThreadSafeDictionary<TKey, TValue>.GetOrAdd(TKey)
ThreadSafeDictionary<TKey, TValue>.GetEnumerator()
ThreadSafeDictionary<TKey, TValue>.Remove(KeyValuePair<TKey, TValue>)
ThreadSafeDictionary<TKey, TValue>.CopyTo(Array, Int32)
ThreadSafeDictionary<TKey, TValue>.CopyTo(KeyValuePair<TKey, TValue>[], Int32)
ThreadSafeDictionary<TKey, TValue>.ISnapshotable<KeyValuePair<TKey, TValue>>.Snapshot
ThreadSafeDictionary<TKey, TValue>.ISnapshotable.Snapshot
ThreadSafeDictionary<TKey, TValue>.Snapshot
ThreadSafeDictionary<TKey, TValue>.Keys
ThreadSafeDictionary<TKey, TValue>.Values
ThreadSafeDictionary<TKey, TValue>.Count
ThreadSafeDictionary<TKey, TValue>.IsEmpty
ThreadSafeDictionary<TKey, TValue>.Entries
ThreadSafeDictionary<TKey, TValue>.Item[TKey]
ThreadSafeDictionary<TKey, TValue>.IsSynchronized
ThreadSafeDictionary<TKey, TValue>.SyncRoot
ThreadSafeDictionary<TKey, TValue>.IsReadOnly
ThreadSafeDictionary<TKey, TValue>.IsFixedSize
Namespace: Eco.Core.Utils
Assembly: Eco.Core.dll
Syntax
public class ControllerDictionary<TKey, TValue> : ThreadSafeDictionary<TKey, TValue>, IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IDictionary, ICollection, ISnapshotable<KeyValuePair<TKey, TValue>>, ISnapshotable, ITrackedControllerEnumerable, ITrackedEnumerable, IEnumerable
Type Parameters
Name Description
TKey
TValue

Constructors

ControllerDictionary(IController, String)

Declaration
public ControllerDictionary(IController parent, [ControllerPropertyName(null)] string propertyName)
Parameters
Type Name Description
IController parent
System.String propertyName

Properties

Callbacks

Declaration
public TrackingCallbacks Callbacks { get; }
Property Value
Type Description
TrackingCallbacks

Item[TKey]

Declaration
public override TValue this[TKey key] { set; }
Parameters
Type Name Description
TKey key
Property Value
Type Description
TValue
Overrides
Eco.Core.Utils.ThreadSafeDictionary<TKey, TValue>.Item[TKey]

Parent

Declaration
public IController Parent { get; }
Property Value
Type Description
IController

PropertyName

Declaration
public string PropertyName { get; }
Property Value
Type Description
System.String

Methods

Add(TKey, TValue)

Calls 'OnAdd' callback regardless of whether the item already existed or not.

Declaration
public override void Add(TKey key, TValue value)
Parameters
Type Name Description
TKey key
TValue value
Overrides
Eco.Core.Utils.ThreadSafeDictionary<TKey, TValue>.Add(TKey, TValue)

AddOrUpdate(TKey, TValue, Func<TKey, TValue, TValue>)

Declaration
public override TValue AddOrUpdate(TKey key, TValue addValue, Func<TKey, TValue, TValue> updateValueFactory)
Parameters
Type Name Description
TKey key
TValue addValue
System.Func<TKey, TValue, TValue> updateValueFactory
Returns
Type Description
TValue
Overrides
Eco.Core.Utils.ThreadSafeDictionary<TKey, TValue>.AddOrUpdate(TKey, TValue, System.Func<TKey, TValue, TValue>)

AddOrUpdate(TKey, Func<TValue>, Func<TValue, TValue>)

Declaration
public override TValue AddOrUpdate(TKey key, Func<TValue> createFunc, Func<TValue, TValue> updateFunc)
Parameters
Type Name Description
TKey key
System.Func<TValue> createFunc
System.Func<TValue, TValue> updateFunc
Returns
Type Description
TValue
Overrides
Eco.Core.Utils.ThreadSafeDictionary<TKey, TValue>.AddOrUpdate(TKey, System.Func<TValue>, System.Func<TValue, TValue>)

AddRange(IEnumerable<KeyValuePair<TKey, TValue>>)

Declaration
public override void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>> pairs
Overrides
Eco.Core.Utils.ThreadSafeDictionary<TKey, TValue>.AddRange(System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>>)

Clear()

Declaration
public override void Clear()
Overrides
Eco.Core.Utils.ThreadSafeDictionary<TKey, TValue>.Clear()

GetOrAdd(TKey, TValue)

Declaration
public override TValue GetOrAdd(TKey key, TValue value)
Parameters
Type Name Description
TKey key
TValue value
Returns
Type Description
TValue
Overrides
Eco.Core.Utils.ThreadSafeDictionary<TKey, TValue>.GetOrAdd(TKey, TValue)

GetOrAdd(TKey, Func<TKey, TValue>)

Declaration
public override TValue GetOrAdd(TKey key, Func<TKey, TValue> createFunc)
Parameters
Type Name Description
TKey key
System.Func<TKey, TValue> createFunc
Returns
Type Description
TValue
Overrides
Eco.Core.Utils.ThreadSafeDictionary<TKey, TValue>.GetOrAdd(TKey, System.Func<TKey, TValue>)

GetSnapshotAndClear()

Declaration
public override IReadOnlyDictionary<TKey, TValue> GetSnapshotAndClear()
Returns
Type Description
System.Collections.Generic.IReadOnlyDictionary<TKey, TValue>
Overrides
Eco.Core.Utils.ThreadSafeDictionary<TKey, TValue>.GetSnapshotAndClear()

Initialize(IController, String)

Declaration
public void Initialize(IController parent, [ControllerPropertyName(null)] string propertyName)
Parameters
Type Name Description
IController parent
System.String propertyName

Remove(TKey)

Declaration
public override bool Remove(TKey key)
Parameters
Type Name Description
TKey key
Returns
Type Description
System.Boolean
Overrides
Eco.Core.Utils.ThreadSafeDictionary<TKey, TValue>.Remove(TKey)

RemoveRange(IEnumerable<TKey>)

Declaration
public override ImmutableDictionary<TKey, TValue> RemoveRange(IEnumerable<TKey> keys)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<TKey> keys
Returns
Type Description
System.Collections.Immutable.ImmutableDictionary<TKey, TValue>
Overrides
Eco.Core.Utils.ThreadSafeDictionary<TKey, TValue>.RemoveRange(System.Collections.Generic.IEnumerable<TKey>)

Set(Dictionary<TKey, TValue>)

Declaration
public override void Set(Dictionary<TKey, TValue> val)
Parameters
Type Name Description
System.Collections.Generic.Dictionary<TKey, TValue> val
Overrides
Eco.Core.Utils.ThreadSafeDictionary<TKey, TValue>.Set(System.Collections.Generic.Dictionary<TKey, TValue>)

Set(ImmutableDictionary<TKey, TValue>)

Declaration
public override void Set(ImmutableDictionary<TKey, TValue> val)
Parameters
Type Name Description
System.Collections.Immutable.ImmutableDictionary<TKey, TValue> val
Overrides
Eco.Core.Utils.ThreadSafeDictionary<TKey, TValue>.Set(System.Collections.Immutable.ImmutableDictionary<TKey, TValue>)

SetItem(TKey, TValue)

Declaration
public override void SetItem(TKey key, TValue value)
Parameters
Type Name Description
TKey key
TValue value
Overrides
Eco.Core.Utils.ThreadSafeDictionary<TKey, TValue>.SetItem(TKey, TValue)

SetItems(IEnumerable<KeyValuePair<TKey, TValue>>)

Declaration
public override void SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>> items
Overrides
Eco.Core.Utils.ThreadSafeDictionary<TKey, TValue>.SetItems(System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>>)

TryAdd(TKey, TValue)

Declaration
public override bool TryAdd(TKey key, TValue value)
Parameters
Type Name Description
TKey key
TValue value
Returns
Type Description
System.Boolean
Overrides
Eco.Core.Utils.ThreadSafeDictionary<TKey, TValue>.TryAdd(TKey, TValue)

TryRemove(TKey, out TValue)

Declaration
public override bool TryRemove(TKey key, out TValue value)
Parameters
Type Name Description
TKey key
TValue value
Returns
Type Description
System.Boolean
Overrides
Eco.Core.Utils.ThreadSafeDictionary<TKey, TValue>.TryRemove(TKey, TValue)

TryRemove(KeyValuePair<TKey, TValue>)

Declaration
public override bool TryRemove(KeyValuePair<TKey, TValue> pair)
Parameters
Type Name Description
System.Collections.Generic.KeyValuePair<TKey, TValue> pair
Returns
Type Description
System.Boolean
Overrides
Eco.Core.Utils.ThreadSafeDictionary<TKey, TValue>.TryRemove(System.Collections.Generic.KeyValuePair<TKey, TValue>)

Implements

System.Collections.Generic.IDictionary<, >
System.Collections.Generic.ICollection<>
System.Collections.Generic.IEnumerable<>
System.Collections.IDictionary
System.Collections.ICollection
ISnapshotable<T>
ISnapshotable
ITrackedControllerEnumerable
ITrackedEnumerable
System.Collections.IEnumerable

Extension Methods

PropertyChanges.FirePropertyChanged(Object, String)
PropertyChanges.FirePropertyChanged(Object, String, Object, Object)
PropertyChanges.FirePropertyChanged(Object, MemberChangedBeforeAfterEventArgs)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾