TelemetrySession.PostProperty(String, Object) 方法

定义

为会话范围的属性将更新排队。 你可能想要考虑 TelemetrySettingPropertyTelemetryMetricProperty 使用 Visual Studio 数据模型提供的其他见解,从而获得更丰富的遥测体验。 如果对 VS Data Model 有任何疑问,请通过电子邮件与数据模型人员 (vsdmcrew@microsoft.com) 。

public:
 void PostProperty(System::String ^ propertyName, System::Object ^ propertyValue);
public void PostProperty (string propertyName, object propertyValue);
member this.PostProperty : string * obj -> unit
Public Sub PostProperty (propertyName As String, propertyValue As Object)

参数

propertyName
String

会话属性名称是唯一的,不能为 null 且不为空。

propertyValue
Object

任何表示属性值的对象。 遥测通道必须使用值。ToString (InvariantCulture) 将值作为字符串发送到服务器。

适用于