|
Swiss Army Knife
General utility tools for Scada Minds
|
A stub read-only dictionary that will pretend any key exists in it, and return the default value given in the constructor. More...
Public Member Functions | |
| SameValueDictionary (TValue returnedValue) | |
| Initializes a new instance of the SameValueDictionary<TKey, TValue> class. More... | |
| IEnumerator< KeyValuePair< TKey, TValue > > | GetEnumerator () |
| Is not implemented - will throw an error if attempting to enumerate over it. More... | |
| void | Add (KeyValuePair< TKey, TValue > item) |
| No-op. More... | |
| void | Clear () |
| No-op. More... | |
| bool | Contains (KeyValuePair< TKey, TValue > item) |
| Will always return true. More... | |
| void | CopyTo (KeyValuePair< TKey, TValue >[] array, int arrayIndex) |
| Throws an error. Not implemented. SameValueDictionary cannot be enumerated over. More... | |
| bool | Remove (KeyValuePair< TKey, TValue > item) |
| Is a no-op, but returns true. More... | |
| void | Add (TKey key, TValue value) |
| No-op. More... | |
| bool | ContainsKey (TKey key) |
| bool | Remove (TKey key) |
| No-op. More... | |
| bool | TryGetValue (TKey key, out TValue value) |
Properties | |
| int | Count [get] |
| Gets how many elements are in this dictionary? Will always pretend to only have one element. More... | |
| bool | IsReadOnly = true [get] |
| TValue | this[TKey key] [get, set] |
| Will always return the "returnedValue" set in the constructor. More... | |
| ICollection< TKey > | Keys [get] |
| Gets an error. Not implemented. SameValueDictionary cannot be enumerated over. More... | |
| ICollection< TValue > | Values [get] |
| Gets an error. Not implemented. SameValueDictionary cannot be enumerated over. More... | |
A stub read-only dictionary that will pretend any key exists in it, and return the default value given in the constructor.
Does not support enumerating over it, or listing keys.
| TKey | : | notnull |
| SameValueDictionary | ( | TValue | returnedValue | ) |
Initializes a new instance of the SameValueDictionary<TKey, TValue> class.
| returnedValue | The value that will be returned on each read operation. |
|
inline |
No-op.
|
inline |
No-op.
| void Clear | ( | ) |
No-op.
| bool Contains | ( | KeyValuePair< TKey, TValue > | item | ) |
Will always return true.
| bool ContainsKey | ( | TKey | key | ) |
| void CopyTo | ( | KeyValuePair< TKey, TValue >[] | array, |
| int | arrayIndex | ||
| ) |
Throws an error. Not implemented. SameValueDictionary cannot be enumerated over.
| IEnumerator<KeyValuePair<TKey, TValue> > GetEnumerator | ( | ) |
Is not implemented - will throw an error if attempting to enumerate over it.
| bool Remove | ( | KeyValuePair< TKey, TValue > | item | ) |
Is a no-op, but returns true.
| bool Remove | ( | TKey | key | ) |
No-op.
|
inline |
|
get |
Gets how many elements are in this dictionary? Will always pretend to only have one element.
|
get |
|
get |
Gets an error. Not implemented. SameValueDictionary cannot be enumerated over.
|
getset |
Will always return the "returnedValue" set in the constructor.
|
get |
Gets an error. Not implemented. SameValueDictionary cannot be enumerated over.