-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathTestAsyncTasks.cs
More file actions
43 lines (37 loc) · 927 Bytes
/
TestAsyncTasks.cs
File metadata and controls
43 lines (37 loc) · 927 Bytes
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
using System.Threading.Tasks;
namespace Nahoum.UnityJSInterop.Tests
{
public class TestTasks
{
[ExposeWeb]
public static TestTasks GetInstance()
{
return new TestTasks();
}
[ExposeWeb]
public async Task TestTaskVoid()
{
await Task.Yield();
}
[ExposeWeb]
public async Task<string> TestTaskString()
{
await Task.Yield();
return SampleValues.TestString;
}
[ExposeWeb]
public async Task<int> TestTaskInt()
{
await Task.Yield();
return SampleValues.TestInt;
}
[ExposeWeb]
public async Task<float> TestTaskFloat()
{
await Task.Yield();
return SampleValues.TestFloat;
}
[ExposeWeb]
public async void AsyncVoidMethod() => await Task.Yield();
}
}