Share via


IAssetProvider.PostAsset(String, TelemetryEventCorrelation) Method

Definition

Post an asset event for specified asset id with given correlation.

public:
 bool PostAsset(System::String ^ assetId, Microsoft::VisualStudio::Telemetry::TelemetryEventCorrelation correlation);
public bool PostAsset (string assetId, Microsoft.VisualStudio.Telemetry.TelemetryEventCorrelation correlation);
abstract member PostAsset : string * Microsoft.VisualStudio.Telemetry.TelemetryEventCorrelation -> bool
Public Function PostAsset (assetId As String, correlation As TelemetryEventCorrelation) As Boolean

Parameters

assetId
String

Used to identify the asset. The id should be immutable in the asset life cycle, even if the status or content changes over time. E.g., project guid is generated during project creation and will never change. This makes it a good candidate for asset id of Project asset.

correlation
TelemetryEventCorrelation

The correlation for to-be-posted asset event.

Returns

A bool value indicating whether provider posts event successfully. Return false if input parameters are valid or unexpected error occurs.

Remarks

To create AssetEvent, use constructor AssetEvent(String, String, Int32, TelemetryEventCorrelation)AssetService calls this method on background thread so please make it thread-safe.

Applies to