The handler that was passed in as a paramter
bool firstCalled, secondCalled; @safe void handler1() {firstCalled = true;} @safe void handler2() { secondCalled = true; assert(firstCalled); } Signal!() onTest; onTest ~= &handler2; onTest.connectFirst(&handler1); onTest(); assert(firstCalled && secondCalled);
Exception if handler is already registered (Only if asserts are enabled! Does not throw in release mode!)
Add a handler to the list of handlers to be called when emit() is called. Add this handler at the top of the list, so it will be called before all other handlers.