src/Picturepark.SDK.V1/Partial/ListItemClient.cs
/// <summary>Gets a list of existing list items and converts their content to the requested type.</summary>
/// <typeparam name="T">The requested content type.</typeparam>
/// <param name="listItemIds">The list of list item IDs.</param>
/// <param name="schemaId">The schema ID of the requested type.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>The list of converted objects.</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
Gets a list of existing list items and converts their content to the requested type.
Gets a list of existing list items and converts their content to the requested type .
public async Task<ICollection<T>> GetManyAndConvertToAsync<T>(IEnumerable<string> listItemIds, string schemaId, CancellationToken cancellationToken = default(CancellationToken))
        {
            var listItems = await GetManyAsync(listItemIds, new ListItemResolveBehavior[] { ListItemResolveBehavior.Content, ListItemResolveBehavior.LinkedListItems }, cancellationToken).ConfigureAwait(false);
            return listItems.Select(li => li.ConvertTo<T>()).ToList();
        }
public async Task < ICollection < T > > GetManyAndConvertToAsync < T > ( IEnumerable < string > listItemIds , string schemaId , CancellationToken cancellationToken = default ( CancellationToken ) ) { var listItems = await GetManyAsync ( listItemIds , new ListItemResolveBehavior [ ] { ListItemResolveBehavior . Content , ListItemResolveBehavior . LinkedListItems } , cancellationToken ) . ConfigureAwait ( false ) ; return listItems . Select ( li => li . ConvertTo < T > ( ) ) . ToList ( ) ; }
Gets a list of existing list items and converts their content to the requested type.
Gets a list of existing list items and converts their content to the requested type .
The list of converted objects.
The list of converted objects .
A server side error occurred.
A server side error occurred .
listItemIds
IEnumerable<string>
The list of list item IDs.
The list of list item IDs .
schemaId
string
The schema ID of the requested type.
The schema ID of the requested type .
cancellationToken
CancellationToken
The cancellation token.
The cancellation token .
typeparam
The requested content type.
The requested content type .