projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge pull request #5714 from alexischr/update_bockbuild
[mono.git]
/
mcs
/
tests
/
test-async-50.cs
1
using System.Threading.Tasks;
2
using System;
3
4
class X
5
{
6
static void Main ()
7
{
8
var x = new X ();
9
x.Run ().Wait ();
10
}
11
12
Task<int> AnimateAsync (Action callback)
13
{
14
callback ();
15
return Task.FromResult (2);
16
}
17
18
void SecondLevel (Action callback)
19
{
20
callback ();
21
}
22
23
async Task Run ()
24
{
25
var ret = await AnimateAsync (() => {
26
SecondLevel (() => {
27
Console.WriteLine (this);
28
});
29
});
30
}
31
}