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
파일 보기 프로젝트 열기: nunit/nunit 1 사용 예제들

공개 메소드들

메소드 설명
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