Nfield.Services.Implementation.NfieldSurveysService.DownloadInterviewerFileInstructionsAsync C# (CSharp) Method

DownloadInterviewerFileInstructionsAsync() public method

INfieldSurveysService.DownloadInterviewerFileInstructionsAsync(string)
public DownloadInterviewerFileInstructionsAsync ( string surveyId ) : Task
surveyId string
return Task
        public Task<InterviewerInstruction> DownloadInterviewerFileInstructionsAsync(string surveyId)
        {
            var uri = GetInterviewerInstructionUri(surveyId, null);

            return Client.GetAsync(uri)
                .ContinueWith(
                    responseMessageTask => new InterviewerInstruction
                        {
                            Content = responseMessageTask.Result.Content.ReadAsByteArrayAsync().Result,
                            FileName = responseMessageTask.Result.Content.Headers.ContentDisposition.FileName
                        })
                .FlattenExceptions();
        }