IAssetProvider.PostAsset(String, TelemetryEventCorrelation) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.