/// <summary> /// Report that the specified event was actually displayed to the user and a /// reward should be expected for it. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='eventId'> /// The event ID this activation applies to. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task ActivateAsync(this IEvents operations, string eventId, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.ActivateWithHttpMessagesAsync(eventId, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Report that the specified event was actually displayed to the user and a /// reward should be expected for it. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='eventId'> /// The event ID this activation applies to. /// </param> /// <param name='customHeaders'> /// Headers that will be added to request. /// </param> public static HttpOperationResponse ActivateWithHttpMessages(this IEvents operations, string eventId, Dictionary <string, List <string> > customHeaders = null) { return(operations.ActivateWithHttpMessagesAsync(eventId, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult()); }