IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
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...
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... | |
![]() | |
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>() |
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.
|
inline |
Adds a key/value pair to the property set
key | The key |
value | The value |
Implements NUnit.Framework.Interfaces.IPropertyBag.
Referenced by NUnit.Framework.PropertyAttribute.PropertyAttribute(), and NUnit.Framework.Internal.PropertyBagTests.SetUp().
|
inline |
Sets the value for a key, removing any other _values that are already in the property set.
key | |
value |
Implements NUnit.Framework.Interfaces.IPropertyBag.
Referenced by NUnit.Framework.Internal.PropertyBagTests.SetAddsNewSingleValue(), and NUnit.Framework.Internal.PropertyBagTests.SetReplacesOldValues().
|
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.
key |
Implements NUnit.Framework.Interfaces.IPropertyBag.
Referenced by NUnit.Framework.Internal.PropertyBagTests.GetReturnsSingleValue(), NUnit.Framework.Internal.PropertyBagTests.SetAddsNewSingleValue(), and NUnit.Framework.Internal.PropertyBagTests.SetReplacesOldValues().
|
inline |
Gets a flag indicating whether the specified key has any entries in the property set.
key | The key to be checked |
Implements NUnit.Framework.Interfaces.IPropertyBag.
Referenced by NUnit.Framework.Internal.PropertyBagTests.ContainsKey().
|
inline |
Returns an XmlNode representating the current PropertyBag.
recursive | Not used |
Implements NUnit.Framework.Interfaces.IXmlNodeBuilder.
Referenced by NUnit.Framework.Internal.PropertyBagTests.XmlIsProducedCorrectly().
Returns an XmlNode representing the PropertyBag after adding it as a child of the supplied parent node.
parentNode | The parent node. |
recursive | Not used |
Implements NUnit.Framework.Interfaces.IXmlNodeBuilder.
References NUnit.Framework.Interfaces.TNode.AddAttribute(), and NUnit.Framework.Interfaces.TNode.AddElement().
|
private |
|
get |
Gets a collection containing all the keys in the property set
Referenced by NUnit.Framework.Internal.PropertyBagTests.AllKeysAreListed().
|
getset |
Gets or sets the list of _values for a particular key