コード例 #1
0
        /// <summary>
        /// Returns a Task&lt;string&gt; which when awaited yields all of the text in the PdfFile.
        /// </summary>
        /// <returns>A Task&lt;string&gt; which when awaited yields all of the text in the PdfFile.</returns>
        public override async Task <string> LoadTextAsync()
        {
            var converter = new PdfToTextConverter(this);
            var converted = await converter.ConvertFileAsync().ConfigureAwait(false);

            return(await converted.LoadTextAsync().ConfigureAwait(false));
        }
コード例 #2
0
        public void ConvertFileAsyncTest()
        {
            var    infile   = Input;
            var    target   = new PdfToTextConverter(infile);
            var    expected = infile.LoadText();
            string actual;

            actual = target.ConvertFileAsync().Result.LoadText();
            Check.That(actual).IsEqualTo(expected);
        }