示例#1
0
    public async Task <DestinationFolder?> GetDestinationFolderAsync(Guid collectionId)
    {
        try
        {
            var result = await _destinationFolderRoomClient.GetAsync(collectionId);

            return(_mapper.Map <DestinationFolder>(result));
        }
        catch (HttpOperationException e) when(e.Response.StatusCode == HttpStatusCode.NotFound)
        {
            return(null);
        }
    }
 /// <summary>
 /// Get the destination folder for collection.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='collectionId'>
 /// The collection id.
 /// </param>
 public static DestinationFolderResponse Get(this IDestinationFolder operations, System.Guid collectionId)
 {
     return(operations.GetAsync(collectionId).GetAwaiter().GetResult());
 }