/// <summary> /// Modifies the Trend with the Id provided to the values supplied. Returns /// the modified Trend. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// Id of the Trend to be modified. Must be double URL encoded. /// </param> /// <param name='updatedItem'> /// Item to be updated. All modfied properties will be changed. Requires /// double URL encoding. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <TrendModel> UpdateAsync(this ITrends operations, string id, UpdateTrendModel updatedItem, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(id, updatedItem, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Modifies the Trend with the Id provided to the values supplied. Returns /// the modified Trend. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// Id of the Trend to be modified. Must be double URL encoded. /// </param> /// <param name='updatedItem'> /// Item to be updated. All modfied properties will be changed. Requires /// double URL encoding. /// </param> public static TrendModel Update(this ITrends operations, string id, UpdateTrendModel updatedItem) { return(Task.Factory.StartNew(s => ((ITrends)s).UpdateAsync(id, updatedItem), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }