向 LoadTestContext 中添加 KeyValuePair<TKey, TValue> 项。
命名空间:  Microsoft.VisualStudio.TestTools.LoadTesting
程序集:  Microsoft.VisualStudio.QualityTools.LoadTestFramework(在 Microsoft.VisualStudio.QualityTools.LoadTestFramework.dll 中)
语法
声明
Public Sub Add ( _
    item As KeyValuePair(Of String, Object) _
)
public void Add(
    KeyValuePair<string, Object> item
)
public:
virtual void Add(
    KeyValuePair<String^, Object^> item
) sealed
abstract Add : 
        item:KeyValuePair<string, Object> -> unit 
override Add : 
        item:KeyValuePair<string, Object> -> unit 
public final function Add(
    item : KeyValuePair<String, Object>
)
参数
- item
 类型:System.Collections.Generic.KeyValuePair<String, Object>
 要添加到 LoadTestContext 的 KeyValuePair<TKey, TValue>。
实现
异常
| 异常 | 条件 | 
|---|---|
| NotSupportedException | LoadTestContext 为只读。 | 
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。