IContextAccessor 接口

用于生成帮助器类以存储和检索来自上下文的值的接口。

命名空间:  Microsoft.VisualStudio.TestTools.Execution
程序集:  Microsoft.VisualStudio.QualityTools.ExecutionCommon(在 Microsoft.VisualStudio.QualityTools.ExecutionCommon.dll 中)

语法

声明
Public Interface IContextAccessor
public interface IContextAccessor
public interface class IContextAccessor
type IContextAccessor =  interface end
public interface IContextAccessor

IContextAccessor 类型公开以下成员。

属性

  名称 说明
公共属性 Count 获取存储的值的总数。

页首

方法

  名称 说明
公共方法 AddDoubleValue 使用指定的键和值添加元素。
公共方法 AddIntValue 添加具有指定键和值的元素。
公共方法 AddObject 添加具有指定键和值的元素。
公共方法 AddStringValue 添加具有指定键和值的元素。
公共方法 GetDoubleValue 检索与指定键关联的值。
公共方法 GetEnumerator 返回循环访问 IContextAccessor 的 IDictionaryEnumerator
公共方法 GetIntValue 检索与指定键关联的值。
公共方法 GetObject 检索与指定键关联的 object。
公共方法 GetStringValue 检索与指定键关联的 string。
公共方法 RemoveValue 移除具有指定键的元素。

页首

请参阅

参考

Microsoft.VisualStudio.TestTools.Execution 命名空间