C# Класс NUnit.Framework.Internal.PropertyBag

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.
Наследование: IPropertyBag
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Add ( string key, object value ) : void

Adds a key/value pair to the property set

AddToXml ( TNode parentNode, bool recursive ) : TNode

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

ContainsKey ( string key ) : bool

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

Get ( string key ) : object

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.

Set ( string key, object value ) : void

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

ToXml ( bool recursive ) : TNode

Returns an XmlNode representing the current PropertyBag.

this ( string key ) : IList

Gets or sets the list of _values for a particular key

Описание методов

Add() публичный Метод

Adds a key/value pair to the property set
public Add ( string key, object value ) : void
key string The key
value object The value
Результат void

AddToXml() публичный Метод

Returns an XmlNode representing the PropertyBag after adding it as a child of the supplied parent node.
public AddToXml ( TNode parentNode, bool recursive ) : TNode
parentNode TNode The parent node.
recursive bool Not used
Результат TNode

ContainsKey() публичный Метод

Gets a flag indicating whether the specified key has any entries in the property set.
public ContainsKey ( string key ) : bool
key string The key to be checked
Результат bool

Get() публичный Метод

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.
public Get ( string key ) : object
key string
Результат object

Set() публичный Метод

Sets the value for a key, removing any other _values that are already in the property set.
public Set ( string key, object value ) : void
key string
value object
Результат void

ToXml() публичный Метод

Returns an XmlNode representing the current PropertyBag.
public ToXml ( bool recursive ) : TNode
recursive bool Not used
Результат TNode

this() публичный Метод

Gets or sets the list of _values for a particular key
public this ( string key ) : IList
key string
Результат IList