- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProgram.cs
More file actions
Latest commit
48 lines (31 loc) · 1.27 KB
/
Copy pathProgram.cs
File metadata and controls
48 lines (31 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
usingSystem.Threading.Tasks;
usingToText.API;
namespaceToText.Example
{
classProgram
{
staticvoidMain(string[]args)
{
// Synchronous
Test();
// Asynchronous
TestAsync().Wait();
}
privatestaticvoidTest()
{
varclient=newToTextClient();
varresult0=client.Convert(@"..\..\..\assets\sample0.png",Languages.English);
varresult1=client.Convert(@"..\..\..\assets\sample1.png",Languages.English);
varresult2=client.Convert(@"..\..\..\assets\sample2.png",Languages.English);
varresult3=client.Convert(@"..\..\..\assets\sample3.jpg",Languages.English);
}
privateasyncstaticTaskTestAsync()
{
varclient=newToTextClient();
varresult0=awaitclient.ConvertAsync(@"..\..\..\assets\sample0.png",Languages.English);
varresult1=awaitclient.ConvertAsync(@"..\..\..\assets\sample1.png",Languages.English);
varresult2=awaitclient.ConvertAsync(@"..\..\..\assets\sample2.png",Languages.English);
varresult3=awaitclient.ConvertAsync(@"..\..\..\assets\sample3.jpg",Languages.English);
}
}
}