Show / Hide Table of Contents

Class ChangeAwareDictionary<TKey, TValue>

Provides a notifiable associative memory

Inheritance
object
ChangeAwareDictionary<TKey, TValue>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: NMF.Expressions
Assembly: NMF.Expressions.Utilities.dll
Syntax
public class ChangeAwareDictionary<TKey, TValue>
Type Parameters
Name Description
TKey

The type of the keys

TValue

The type of the values

Constructors

| Edit this page View Source

ChangeAwareDictionary()

Creates a new change-aware dictionary

Declaration
public ChangeAwareDictionary()
| Edit this page View Source

ChangeAwareDictionary(ChangeAwareDictionary<TKey, TValue>)

Creates a new change-aware dictionary based on a template

Declaration
public ChangeAwareDictionary(ChangeAwareDictionary<TKey, TValue> template)
Parameters
Type Name Description
ChangeAwareDictionary<TKey, TValue> template

The template dictionary

| Edit this page View Source

ChangeAwareDictionary(IEqualityComparer<TKey>)

Creates a new change-aware dictionary

Declaration
public ChangeAwareDictionary(IEqualityComparer<TKey> comparer)
Parameters
Type Name Description
IEqualityComparer<TKey> comparer

The comparer that should be used to compare dictionary entries

Properties

| Edit this page View Source

this[TKey]

Gets or sets a value for the given key

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

The key element

Property Value
Type Description
TValue

The current value for the given key

Methods

| Edit this page View Source

AsNotifiable(TKey)

Gets an object that tracks the current value for the given key

Declaration
public INotifyReversableValue<TValue> AsNotifiable(TKey key)
Parameters
Type Name Description
TKey key

The given key

Returns
Type Description
INotifyReversableValue<TValue>

An object that tracks the current value and notifies clients when this value changes

| Edit this page View Source

Forget(TKey)

Forgets the notifiable value for the given key

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

The key object

Returns
Type Description
bool

True, if there was an element for the given key, otherwise false

Extension Methods

ExpressionExtensions.AsOne<T>(T)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX