Share via


IContextAccessor Interface

Interface to use to build a helper class to store and retrieve values from contexts.

Namespace:  Microsoft.VisualStudio.TestTools.Execution
Assembly:  Microsoft.VisualStudio.QualityTools.ExecutionCommon (in Microsoft.VisualStudio.QualityTools.ExecutionCommon.dll)

Syntax

'Declaration
Public Interface IContextAccessor
public interface IContextAccessor
public interface class IContextAccessor
type IContextAccessor =  interface end
public interface IContextAccessor

The IContextAccessor type exposes the following members.

Properties

  Name Description
Public property Count Gets the total number of values that are stored.

Top

Methods

  Name Description
Public method AddDoubleValue Adds an element by using the specified key and value.
Public method AddIntValue Adds an element with the specified key and value.
Public method AddObject Adds an element with the specified key and value.
Public method AddStringValue Adds an element with the specified key and value.
Public method GetDoubleValue Retrieves the value that is associated with the specified key.
Public method GetEnumerator Returns an IDictionaryEnumerator that iterates through the IContextAccessor.
Public method GetIntValue Retrieves the value that is associated with the specified key.
Public method GetObject Retrieves the object that is associated with the specified key.
Public method GetStringValue Retrieves a string that is associated with the specified key.
Public method RemoveValue Removes the element with the specified key.

Top

See Also

Reference

Microsoft.VisualStudio.TestTools.Execution Namespace