Example #1
0
 /// <summary>
 /// Gets all terms from the list with list Id equal to the list Id passed.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='listId'>
 /// List Id of the image list.
 /// </param>
 /// <param name='language'>
 /// Language of the terms.
 /// </param>
 /// <param name='offset'>
 /// The pagination start index.
 /// </param>
 /// <param name='limit'>
 /// The max limit.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Terms> GetAllTermsAsync(this IListManagementTerm operations, string listId, string language, int?offset = default(int?), int?limit = default(int?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetAllTermsWithHttpMessagesAsync(listId, language, offset, limit, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #2
0
 /// <summary>
 /// Add a term to the term list with list Id equal to list Id passed.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='listId'>
 /// List Id of the image list.
 /// </param>
 /// <param name='term'>
 /// Term to be deleted
 /// </param>
 /// <param name='language'>
 /// Language of the terms.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> AddTermAsync(this IListManagementTerm operations, string listId, string term, string language, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.AddTermWithHttpMessagesAsync(listId, term, language, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #3
0
 /// <summary>
 /// Deletes a term from the list with list Id equal to the list Id passed.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='listId'>
 /// List Id of the image list.
 /// </param>
 /// <param name='term'>
 /// Term to be deleted
 /// </param>
 /// <param name='language'>
 /// Language of the terms.
 /// </param>
 public static string DeleteTerm(this IListManagementTerm operations, string listId, string term, string language)
 {
     return(operations.DeleteTermAsync(listId, term, language).GetAwaiter().GetResult());
 }
Example #4
0
 /// <summary>
 /// Gets all terms from the list with list Id equal to the list Id passed.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='listId'>
 /// List Id of the image list.
 /// </param>
 /// <param name='language'>
 /// Language of the terms.
 /// </param>
 /// <param name='offset'>
 /// The pagination start index.
 /// </param>
 /// <param name='limit'>
 /// The max limit.
 /// </param>
 public static Terms GetAllTerms(this IListManagementTerm operations, string listId, string language, int?offset = default(int?), int?limit = default(int?))
 {
     return(operations.GetAllTermsAsync(listId, language, offset, limit).GetAwaiter().GetResult());
 }