scriptcs/scriptcs — pull request #628 by glennblock (2014-04-14 07:17:52+00:00)
Title: Fix for #623

This solution moves services that were previously only available in the RuntimeServices object to InitializationServices. It then exposes InitializationServices on the IScriptServicesBuilder. Next it changes the CommandFactory to receive an IScriptServiceBuilder instance rather than a ScriptServices instance. The factory will only call Build on the builder IF a script is executed. This means the engine and related services will not get created until necessary.

Using Lazy on the existing ScriptServices object was an option over this refactoring, but it would have required changing all the existing code and tests that reference the ScriptServices object. The approach I used here does not affect the surface of the existing ScriptServices object.