用于生成帮助器类以存储和检索来自上下文的值的接口。
命名空间:  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 类型公开以下成员。
属性
| 名称 | 说明 | |
|---|---|---|
| .gif) | Count | 获取存储的值的总数。 | 
页首
方法
| 名称 | 说明 | |
|---|---|---|
| .gif) | AddDoubleValue | 使用指定的键和值添加元素。 | 
| .gif) | AddIntValue | 添加具有指定键和值的元素。 | 
| .gif) | AddObject | 添加具有指定键和值的元素。 | 
| .gif) | AddStringValue | 添加具有指定键和值的元素。 | 
| .gif) | GetDoubleValue | 检索与指定键关联的值。 | 
| .gif) | GetEnumerator | 返回用于循环访问 IContextAccessor 的 IDictionaryEnumerator。 | 
| .gif) | GetIntValue | 检索与指定键关联的值。 | 
| .gif) | GetObject | 检索与指定键关联的 object。 | 
| .gif) | GetStringValue | 检索与指定键关联的 string。 | 
| .gif) | RemoveValue | 移除具有指定键的元素。 | 
页首