Search Results for

    Show / Hide Table of Contents

    Class TestContext.PropertyBagAdapter

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

    Inheritance
    object
    TestContext.PropertyBagAdapter
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: NUnit.Framework
    Assembly: nunit.framework.dll
    Syntax
    public class TestContext.PropertyBagAdapter

    Constructors

    View Source

    PropertyBagAdapter(IPropertyBag)

    Construct a TestContext.PropertyBagAdapter from a source IPropertyBag.

    Declaration
    public PropertyBagAdapter(IPropertyBag source)
    Parameters
    Type Name Description
    IPropertyBag source

    Properties

    View Source

    this[string]

    Returns a collection of properties with the given key.

    Declaration
    public IEnumerable<object> this[string key] { get; }
    Parameters
    Type Name Description
    string key
    Property Value
    Type Description
    IEnumerable<object>
    View Source

    Keys

    Returns a collection of the property keys.

    Declaration
    public ICollection<string> Keys { get; }
    Property Value
    Type Description
    ICollection<string>

    Methods

    View Source

    ContainsKey(string)

    Indicates whether key is found in this TestContext.PropertyBagAdapter.

    Declaration
    public bool ContainsKey(string key)
    Parameters
    Type Name Description
    string key
    Returns
    Type Description
    bool
    View Source

    Count(string)

    Returns the count of elements with the given key.

    Declaration
    public int Count(string key)
    Parameters
    Type Name Description
    string key
    Returns
    Type Description
    int
    View Source

    Get(string)

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

    Declaration
    public object? Get(string key)
    Parameters
    Type Name Description
    string key
    Returns
    Type Description
    object
    • View Source
    In this article
    Back to top Generated by DocFX | Copyright (c) 2018- The NUnit Project - Licensed under CC BY-NC-SA 4.0