LoadTestContext.Item 属性

获取或设置具有指定键的 LoadTestContext 元素。

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

语法

声明
Public Default Property Item ( _
    key As String _
) As Object
    Get
    Set
public Object this[
    string key
] { get; set; }
public:
virtual property Object^ default[String^ key] {
    Object^ get (String^ key) sealed;
    void set (String^ key, Object^ value) sealed;
}
abstract Item : Object with get, set
override Item : Object with get, set
JScript 不支持索引属性。

参数

  • key
    类型:System.String
    要获取或设置的元素的键。

属性值

类型:System.Object
具有指定键的元素。

实现

IDictionary<TKey, TValue>.Item[TKey]

异常

异常 条件
ArgumentNullException

key 为 nullnull 引用(在 Visual Basic 中为 Nothing)。

KeyNotFoundException

检索该属性但找不到 key。

NotSupportedException

设置该属性,而且 LoadTestContext 为只读。

.NET Framework 安全性

请参见

参考

LoadTestContext 类

Microsoft.VisualStudio.TestTools.LoadTesting 命名空间