src/Picturepark.SDK.V1/Partial/ListItemClient.cs
/// <summary>Gets an existing list item and converts its content to the requested type.</summary>
/// <typeparam name="T">The requested content type.</typeparam>
/// <param name="listItemId">The list item ID.</param>
/// <param name="schemaId">The schema ID of the requested type.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>The converted object.</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
Gets an existing list item and converts its content to the requested type.
Gets an existing list item and converts its content to the requested type .
public async Task<T> GetAndConvertToAsync<T>(string listItemId, string schemaId, CancellationToken cancellationToken = default(CancellationToken))
        {
            var listItem = await GetAsync(listItemId, new ListItemResolveBehavior[] { ListItemResolveBehavior.Content, ListItemResolveBehavior.LinkedListItems }, cancellationToken).ConfigureAwait(false);
            return listItem.ConvertTo<T>();
        }
public async Task < T > GetAndConvertToAsync < T > ( string listItemId , string schemaId , CancellationToken cancellationToken = default ( CancellationToken ) ) { var listItem = await GetAsync ( listItemId , new ListItemResolveBehavior [ ] { ListItemResolveBehavior . Content , ListItemResolveBehavior . LinkedListItems } , cancellationToken ) . ConfigureAwait ( false ) ; return listItem . ConvertTo < T > ( ) ; }
Gets an existing list item and converts its content to the requested type.
Gets an existing list item and converts its content to the requested type .
The converted object.
The converted object .
A server side error occurred.
A server side error occurred .
listItemId
string
The list item ID.
The list item ID .
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 .