CVB.Net 14.0
NodeDictionaryBase< TNode > Class Template Referenceabstract

Base class for all GevServer node dictionaries. More...

Inherits IDictionary< string, TNode >, and IDisposable.

Inherited by NodeDictionary< TNode >.

Public Member Functions

void Dispose ()
 Disposes of this dictionary and all its nodes.
 
bool ContainsKey (string key)
 Gets whether this dictionaries contains the given key . More...
 
bool Remove (string key)
 Removes the node identified by the given key . More...
 

Protected Member Functions

virtual void Dispose (bool disposing)
 Dispose implementation. More...
 
abstract void AddNode (string key, TNode value)
 Adds a new TNode value associated to the given key . More...
 
abstract bool RemoveNode (string key)
 Removes the node at the given key . More...
 
TNode GetNode (string key)
 Actual implementation for getting nodes. More...
 
bool TryGetNode (string key, out TNode value)
 Tries to get the TNode value with the given key . More...
 

Properties

bool IsDisposed [get]
 Gets whether this dictionary has been disposed.
 
IDictionary< string, TNode > Nodes = new Dictionary<string, TNode>() [get]
 Gets the dictionary holding all node objects.
 
TNode this[string key] [get, set]
 Indexer of this dictionary to get/add TNode objects. More...
 
int Count [get]
 Gets the number of TNodes in this dictionary.
 
abstract bool IsReadOnly [get]
 Gets whether this dictionary is read only.
 
ICollection< string > Keys [get]
 Gets the keys for all nodes.
 
ICollection< TNode > Values [get]
 Gets all the TNodes in this dictionary.
 

Detailed Description

Base class for all GevServer node dictionaries.

Template Parameters
TNode
Type Constraints
TNode :Node 

Member Function Documentation

◆ AddNode()

abstract void AddNode ( string  key,
TNode  value 
)
protectedpure virtual

Adds a new TNode value associated to the given key .

Parameters
keyKey to identify value .
valueTNode to store.

Implemented in NodeDictionary< TNode >.

◆ ContainsKey()

bool ContainsKey ( string  key)

Gets whether this dictionaries contains the given key .

Parameters
keyKey to find.
Returns
true if key was found; false if not.

◆ Dispose()

virtual void Dispose ( bool  disposing)
protectedvirtual

Dispose implementation.

Parameters
disposingtrue if called from IDisposable.Dispose; false if called from finalizer.

Reimplemented in NodeMap.

◆ GetNode()

TNode GetNode ( string  key)
protected

Actual implementation for getting nodes.

Parameters
keyNode key to find TNode object.
Returns
The TNode associated with the key .

◆ Remove()

bool Remove ( string  key)

Removes the node identified by the given key .

Parameters
keyKey to identify the node to remove.
Returns
true if TNode object was removed; false if not.

◆ RemoveNode()

abstract bool RemoveNode ( string  key)
protectedpure virtual

Removes the node at the given key .

Parameters
keyNode key to identify entry to remove.
Returns
true if the key was actually removed; false otherwise.

Implemented in NodeDictionary< TNode >, and NodeMap.

◆ TryGetNode()

bool TryGetNode ( string  key,
out TNode  value 
)
protected

Tries to get the TNode value with the given key .

Parameters
keyKey of node to find.
valueVariable to receive found node.
Returns
true if key was found; false if not.

Property Documentation

◆ this[string key]

TNode this[string key]
getset

Indexer of this dictionary to get/add TNode objects.

Parameters
keyNode key to find TNode object.
Returns
The TNode associated with the key .