コード例 #1
0
        public void TestExtract(string filePath)
        {
            var fileInfo = new Model.FileInfo {
                FilePath = filePath
            };
            var annotations = AnnotateApi.Extract(new ExtractRequest(fileInfo));

            Assert.AreNotEqual(null, annotations);
            Assert.Greater(annotations.Count, 0);
            Assert.IsInstanceOf(typeof(AnnotationInfo), annotations[0]);
        }
        public static void Run()
        {
            var apiInstance = new AnnotateApi(Constants.GetConfig());

            try
            {
                var fileInfo = new FileInfo {
                    FilePath = "input.docx"
                };

                var response = apiInstance.Extract(new ExtractRequest(fileInfo));

                Console.WriteLine("ExtractAnnotations: annotations count = " + response.Count);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception while calling AnnotateApi: " + e.Message);
            }
        }