a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
46 lines
460 B
C#
46 lines
460 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
|
|
class A
|
|
{
|
|
public Task<int> OpenAsync ()
|
|
{
|
|
return Task.FromResult (0);
|
|
}
|
|
}
|
|
|
|
class C
|
|
{
|
|
public static int Main ()
|
|
{
|
|
var c = new C ();
|
|
return c.Foo ().Result;
|
|
}
|
|
|
|
public A Connection
|
|
{
|
|
get
|
|
{
|
|
return new A ();
|
|
}
|
|
}
|
|
|
|
async Task<int> Foo ()
|
|
{
|
|
{
|
|
await Test (
|
|
async () => {
|
|
await Connection.OpenAsync ();
|
|
});
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
T Test<T> (Func<T> func)
|
|
{
|
|
return func ();
|
|
}
|
|
}
|
|
|