IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
NUnit.Framework.Internal.PropertyBag Class Reference

A PropertyBag represents a collection of name value pairs that allows duplicate entries with the same key. Methods are provided for adding a new pair as well as for setting a key to a single value. All keys are strings but _values may be of any type. Null _values are not permitted, since a null entry represents the absence of the key. More...

+ Inheritance diagram for NUnit.Framework.Internal.PropertyBag:
+ Collaboration diagram for NUnit.Framework.Internal.PropertyBag:

Public Member Functions

void Add (string key, object value)
 Adds a key/value pair to the property set More...
 
void Set (string key, object value)
 Sets the value for a key, removing any other _values that are already in the property set. More...
 
object Get (string key)
 Gets a single value for a key, using the first one if multiple _values are present and returning null if the value is not found. More...
 
bool ContainsKey (string key)
 Gets a flag indicating whether the specified key has any entries in the property set. More...
 
TNode ToXml (bool recursive)
 Returns an XmlNode representating the current PropertyBag. More...
 
TNode AddToXml (TNode parentNode, bool recursive)
 Returns an XmlNode representing the PropertyBag after adding it as a child of the supplied parent node. More...
 

Properties

ICollection< string > Keys [get]
 Gets a collection containing all the keys in the property set More...
 
IList this[string key] [get, set]
 Gets or sets the list of _values for a particular key More...
 
- Properties inherited from NUnit.Framework.Interfaces.IPropertyBag
IList this[string key] [get, set]
 Gets or sets the list of _values for a particular key More...
 
ICollection< string > Keys [get]
 Gets a collection containing all the keys in the property set More...
 

Private Attributes

Dictionary< string, IList > inner = new Dictionary<string, IList>()
 

Detailed Description

A PropertyBag represents a collection of name value pairs that allows duplicate entries with the same key. Methods are provided for adding a new pair as well as for setting a key to a single value. All keys are strings but _values may be of any type. Null _values are not permitted, since a null entry represents the absence of the key.

Member Function Documentation

void NUnit.Framework.Internal.PropertyBag.Add ( string  key,
object  value 
)
inline

Adds a key/value pair to the property set

Parameters
keyThe key
valueThe value

Implements NUnit.Framework.Interfaces.IPropertyBag.

Referenced by NUnit.Framework.PropertyAttribute.PropertyAttribute(), and NUnit.Framework.Internal.PropertyBagTests.SetUp().

void NUnit.Framework.Internal.PropertyBag.Set ( string  key,
object  value 
)
inline

Sets the value for a key, removing any other _values that are already in the property set.

Parameters
key
value

Implements NUnit.Framework.Interfaces.IPropertyBag.

Referenced by NUnit.Framework.Internal.PropertyBagTests.SetAddsNewSingleValue(), and NUnit.Framework.Internal.PropertyBagTests.SetReplacesOldValues().

object NUnit.Framework.Internal.PropertyBag.Get ( string  key)
inline

Gets a single value for a key, using the first one if multiple _values are present and returning null if the value is not found.

Parameters
key
Returns

Implements NUnit.Framework.Interfaces.IPropertyBag.

Referenced by NUnit.Framework.Internal.PropertyBagTests.GetReturnsSingleValue(), NUnit.Framework.Internal.PropertyBagTests.SetAddsNewSingleValue(), and NUnit.Framework.Internal.PropertyBagTests.SetReplacesOldValues().

bool NUnit.Framework.Internal.PropertyBag.ContainsKey ( string  key)
inline

Gets a flag indicating whether the specified key has any entries in the property set.

Parameters
keyThe key to be checked
Returns
True if their are _values present, otherwise false

Implements NUnit.Framework.Interfaces.IPropertyBag.

Referenced by NUnit.Framework.Internal.PropertyBagTests.ContainsKey().

TNode NUnit.Framework.Internal.PropertyBag.ToXml ( bool  recursive)
inline

Returns an XmlNode representating the current PropertyBag.

Parameters
recursiveNot used
Returns
An XmlNode representing the PropertyBag

Implements NUnit.Framework.Interfaces.IXmlNodeBuilder.

Referenced by NUnit.Framework.Internal.PropertyBagTests.XmlIsProducedCorrectly().

TNode NUnit.Framework.Internal.PropertyBag.AddToXml ( TNode  parentNode,
bool  recursive 
)
inline

Returns an XmlNode representing the PropertyBag after adding it as a child of the supplied parent node.

Parameters
parentNodeThe parent node.
recursiveNot used
Returns

Implements NUnit.Framework.Interfaces.IXmlNodeBuilder.

References NUnit.Framework.Interfaces.TNode.AddAttribute(), and NUnit.Framework.Interfaces.TNode.AddElement().

Member Data Documentation

Dictionary<string, IList> NUnit.Framework.Internal.PropertyBag.inner = new Dictionary<string, IList>()
private

Property Documentation

ICollection<string> NUnit.Framework.Internal.PropertyBag.Keys
get

Gets a collection containing all the keys in the property set

Referenced by NUnit.Framework.Internal.PropertyBagTests.AllKeysAreListed().

IList NUnit.Framework.Internal.PropertyBag.this[string key]
getset

Gets or sets the list of _values for a particular key


The documentation for this class was generated from the following file: