/// <inheritdoc /> ICollection<int> IDiscoverable<int>.Discover() { var request = new RecipeDiscoveryRequest(); var response = this.serviceClient.Send<RecipeCollectionDataContract>(request); if (response.Content == null) { return new List<int>(0); } return this.converterForRecipeCollection.Convert(response.Content, null); }
/// <inheritdoc /> Task<ICollection<int>> IDiscoverable<int>.DiscoverAsync(CancellationToken cancellationToken) { var request = new RecipeDiscoveryRequest(); var responseTask = this.serviceClient.SendAsync<RecipeCollectionDataContract>(request, cancellationToken); return responseTask.ContinueWith<ICollection<int>>(this.ConvertAsyncResponse, cancellationToken); }