StoreServicesExperimentVariation.GetRefreshedVariationAsync(String) Method

Definition

Retrieves the latest variation assignment for the experiment from the server.

public:
 static IAsyncOperation<StoreServicesExperimentVariationResult ^> ^ GetRefreshedVariationAsync(Platform::String ^ experimentProjectId);
 static IAsyncOperation<StoreServicesExperimentVariationResult> GetRefreshedVariationAsync(winrt::hstring const & experimentProjectId);
public static IAsyncOperation<StoreServicesExperimentVariationResult> GetRefreshedVariationAsync(string experimentProjectId);
function getRefreshedVariationAsync(experimentProjectId)
Public Shared Function GetRefreshedVariationAsync (experimentProjectId As String) As IAsyncOperation(Of StoreServicesExperimentVariationResult)

Parameters

experimentProjectId
System.String

The project ID of the experiment for which you want to retrieve the latest variation assignment from the server.

Returns

A StoreServicesExperimentVariationResult that represents the result of the asynchronous operation. This object provides access to the latest variation assignment.

Remarks

This method retrieves the latest variation assignment from the server for the experiment that is associated with the specified project ID.

When you retrieve an experiment variation in your app, we recommend that you first call GetCachedVariationAsync to get the locally cached variation assignment. Before using the variation assignment, use the IsStale property to determine whether there is an updated variation assignment available from the server. If there is, then call the GetRefreshedVariationAsync method to get the latest variation assignment.

For a code example that demonstrates how to use this method, see Code your experiment in your app.

Applies to

See also