Table of Contents

Class TestContext.PropertyBagAdapter

Namespace
NUnit.Framework
Assembly
nunit.framework.dll

TestContext.PropertyBagAdapter adapts an IPropertyBag for consumption by the user.

public class TestContext.PropertyBagAdapter
Inheritance
TestContext.PropertyBagAdapter
Inherited Members

Constructors

PropertyBagAdapter(IPropertyBag)

Construct a TestContext.PropertyBagAdapter from a source IPropertyBag.

public PropertyBagAdapter(IPropertyBag source)

Parameters

source IPropertyBag

Properties

this[string]

Returns a collection of properties with the given key.

public IEnumerable<object> this[string key] { get; }

Parameters

key string

Property Value

IEnumerable<object>

Keys

Returns a collection of the property keys.

public ICollection<string> Keys { get; }

Property Value

ICollection<string>

Methods

ContainsKey(string)

Indicates whether key is found in this TestContext.PropertyBagAdapter.

public bool ContainsKey(string key)

Parameters

key string

Returns

bool

Count(string)

Returns the count of elements with the given key.

public int Count(string key)

Parameters

key string

Returns

int

Get(string)

Get the first property with the given key, if it can be found, otherwise returns null.

public object? Get(string key)

Parameters

key string

Returns

object