private static async Task <Response <DetectLanguageResultCollection> > CreateDetectLanguageResponseAsync(Response response, IDictionary <string, int> idToIndexMap, CancellationToken cancellation) { DetectLanguageResultCollection result = await TextAnalyticsServiceSerializer.DeserializeDetectLanguageResponseAsync(response.ContentStream, idToIndexMap, cancellation).ConfigureAwait(false); return(Response.FromValue(result, response)); }
private static async Task <Response <DocumentResultCollection <DetectedLanguage> > > CreateDetectLanguageResponseAsync(Response response, CancellationToken cancellation) { DocumentResultCollection <DetectedLanguage> result = await TextAnalyticsServiceSerializer.DeserializeDetectLanguageResponseAsync(response.ContentStream, cancellation).ConfigureAwait(false); return(Response.FromValue(result, response)); }