public void TestScanAssemblyHandlerRegistrationStyle() { Builder.RegisterAssemblyTypes(typeof(ScanTestHandler1).Assembly) .Where(t => t.FullName.StartsWith("Autofac.Dispatcher.Test.ReflectionHandlerRegistrationTests+ScanTestHandler")) .AsHandler(); var testEvent = new ScanTestEvent(); Dispatcher.Send(testEvent); testEvent.HandlerNames.ShouldAllBeEquivalentTo(new[] { "ScanTestHandler1", "ScanTestHandler2" }); }
public void Handle(ScanTestEvent theEvent) { theEvent.AddHandler(this); }