/// <summary>Discovers identifiers of objects in the data source.</summary> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that provides cancellation support.</param> /// <exception cref="NotSupportedException">The data source does not support the discovery of object identifiers.</exception> /// <exception cref="ServiceException">An error occurred while retrieving data from the data source.</exception> /// <exception cref="TaskCanceledException">A task was canceled.</exception> /// <returns>A collection of object identifiers.</returns> async Task <ICollection <string> > IDiscoverable <string> .DiscoverAsync(CancellationToken cancellationToken) { var request = new CharacterDiscoveryRequest(); var response = await this.serviceClient.SendAsync <ICollection <string> >(request, cancellationToken).ConfigureAwait(false); return(this.identifiersResponseConverter.Convert(response, null)); }
/// <summary>Discovers identifiers of objects in the data source.</summary> /// <exception cref="NotSupportedException">The data source does not support the discovery of object identifiers.</exception> /// <exception cref="ServiceException">An error occurred while retrieving data from the data source.</exception> /// <returns>A collection of object identifiers.</returns> ICollection <string> IDiscoverable <string> .Discover() { var request = new CharacterDiscoveryRequest(); var response = this.serviceClient.Send <ICollection <string> >(request); return(this.identifiersResponseConverter.Convert(response, null)); }
/// <summary>Discovers identifiers of objects in the data source.</summary> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that provides cancellation support.</param> /// <exception cref="NotSupportedException">The data source does not support the discovery of object identifiers.</exception> /// <exception cref="ServiceException">An error occurred while retrieving data from the data source.</exception> /// <exception cref="TaskCanceledException">A task was canceled.</exception> /// <returns>A collection of object identifiers.</returns> Task <ICollection <string> > IDiscoverable <string> .DiscoverAsync(CancellationToken cancellationToken) { var request = new CharacterDiscoveryRequest(); var response = this.serviceClient.SendAsync <ICollection <string> >(request, cancellationToken); return(response.ContinueWith <ICollection <string> >(this.ConvertAsyncResponse, cancellationToken)); }