public DefinitionBuilder GetDefinitionBuilder() { if (_definitionBuilder == null) { _definitionBuilder = new DefinitionBuilder( _settings.RootPath, Environment.CurrentDirectory, _settings.DefaultLanguage, () => { return GetDefaultHandlers() .Select(x => new BuiltInCommand(x.Command, x.Usage)); }, (path) => PluginLocator().LocateFor(path)); } return _definitionBuilder; }
public DefinitionBuilder GetDefinitionBuilder() { if (_definitionBuilder == null) { var enabledLanguages = _settings.EnabledLanguages; if (enabledLanguages == null) enabledLanguages = new string[] {}; _definitionBuilder = new DefinitionBuilder( _settings.RootPath, Environment.CurrentDirectory, _settings.DefaultLanguage, enabledLanguages, () => { return GetDefaultHandlers() .Select(x => new BuiltInCommand(x.Command, x.Usage)); }, (path) => PluginLocator().LocateAllFor(path)); } return _definitionBuilder; }