static struct TestActor1 { @ThreadEvent void foo(string) {} } static assert(ThreadEventMethods!TestActor1.length == 1); static assert(ThreadEventMethods!TestActor1[0].identifier == "foo"); static assert(is(ThreadEventMethods!TestActor1[0].Parameters[0] == string)); static struct TestActor2 { void foo(string) {} } static assert(ThreadEventMethods!TestActor2.length == 0); static struct TestActor3 { @ThreadEvent void foo() {} @ThreadEvent void bar(string) {} void hoge(int) {} } static assert(ThreadEventMethods!TestActor3.length == 2);
Tがもつ,すべてのActorイベントハンドラをThreadEventMethod型にして返します.