Пример #1
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='value'>
 /// </param>
 public static void Post(this IVariationOperations operations, string locationId, string itemId, ItemVariation value)
 {
     Task.Factory.StartNew(s => ((IVariationOperations)s).PostAsync(locationId, itemId, value), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
Пример #2
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='value'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task PostAsync(this IVariationOperations operations, string locationId, string itemId, ItemVariation value, CancellationToken cancellationToken = default(CancellationToken))
 {
     await operations.PostWithHttpMessagesAsync(locationId, itemId, value, null, cancellationToken).ConfigureAwait(false);
 }
Пример #3
0
        public Task <HttpOperationResponse <ItemVariation> > PutWithHttpMessagesAsync(string locationId, string itemId, string id, ItemVariation value, Dictionary <string, List <string> > customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            var uri = GetUri(locationId, itemId).Append(id);

            return(PutWithHttpMessagesAsync(uri, value, customHeaders, cancellationToken));
        }