コード例 #1
0
 public async void TestWithoutDispiose ()
 {
     ITesseractApi api = new TesseractApi ();
     await api.Init ("eng");
     for (int i = 0; i < 20; i++) {
         using (var stream = TesseractApiRecogniseTest.LoadSample ("sample2.png")) {
             var result = await api.SetImage (stream);
             Assert.IsTrue (result);
             Assert.AreEqual ("ABCDE FGHI\nJKLHN OPQR\nSTUVVJXYZ\n\n", api.Text);
         }
     }
     api.Dispose ();
 }
コード例 #2
0
 public async void TestWithoutDispiose ()
 {
     ITesseractApi api = new TesseractApi (Android.App.Application.Context, AssetsDeployment.OncePerInitialization);
     await api.Init ("eng");
     for (int i = 0; i < 20; i++) {
         using (var stream = TesseractApiRecogniseTest.LoadSample ("sample2.png")) {
             var result = await api.SetImage (stream);
             Assert.IsTrue (result);
             Assert.AreEqual ("ABCDE FGHI\nJKLHN OPQR\nSTUVVJXYZ", api.Text);
         }
     }
     api.Dispose ();
 }
コード例 #3
0
        public async void TestWithoutDispiose()
        {
            ITesseractApi api = new TesseractApi();
            await api.Init("eng");

            for (int i = 0; i < 20; i++)
            {
                using (var stream = TesseractApiRecogniseTest.LoadSample("sample2.png")) {
                    var result = await api.SetImage(stream);

                    Assert.IsTrue(result);
                    Assert.AreEqual("ABCDE FGHI\nJKLHN OPQR\nSTUVVJXYZ\n\n", api.Text);
                }
            }
            api.Dispose();
        }
コード例 #4
0
        public async void TestWithoutDispiose()
        {
            ITesseractApi api = new TesseractApi(Android.App.Application.Context, AssetsDeployment.OncePerInitialization);
            await api.Init("eng");

            for (int i = 0; i < 20; i++)
            {
                using (var stream = TesseractApiRecogniseTest.LoadSample("sample2.png")) {
                    var result = await api.SetImage(stream);

                    Assert.IsTrue(result);
                    Assert.AreEqual("ABCDE FGHI\nJKLHN OPQR\nSTUVVJXYZ", api.Text);
                }
            }
            api.Dispose();
        }
コード例 #5
0
 public void Tear()
 {
     _api.Dispose();
     _api = null;
 }