Added conditional use of ICodeGenerator depending on configuration.