NancyFx/Nancy — pull request #391 by ChrisMH (2011-11-06 03:04:52+00:00)
Title: Fixed exception calling IStartup.InstanceRegistrations

I'm writing an IStartup class and implementing IStartup.InstanceRegistrations. However, returning anything but null from this property throws an InvalidOperationException because the TinyIoC was modified while it was being enumerated (via GetStartupTasks()).

I simply added a .ToList() to GetStartupTasks() and all is well.