a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
40 lines
427 B
C#
40 lines
427 B
C#
using System;
|
|
|
|
class C
|
|
{
|
|
public static void Main ()
|
|
{
|
|
new C ().Test ();
|
|
}
|
|
|
|
void Test ()
|
|
{
|
|
var v = new View ();
|
|
v.Click += async (o, e) => {
|
|
var b = new Builder ();
|
|
b.SetButton (() => {
|
|
Console.WriteLine (this);
|
|
});
|
|
};
|
|
v.Run ();
|
|
}
|
|
}
|
|
|
|
class View
|
|
{
|
|
public event EventHandler Click;
|
|
|
|
public void Run ()
|
|
{
|
|
Click (null, null);
|
|
}
|
|
}
|
|
|
|
class Builder
|
|
{
|
|
public void SetButton (Action h)
|
|
{
|
|
h ();
|
|
}
|
|
}
|