private void printConfigurationOptions(string path)
        {
            var paths = new List<string>();
            // Editor engine
            paths.Add(
                Path.Combine(
                    Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
                    "EditorEngine"));
            // Languages
            foreach (var plugin in _pluginLocator.Locate())
                paths.Add(plugin.GetPluginDir());
            // Scripts
            var definitions =
                Bootstrapper.GetDefinitionBuilder()
                    .Definitions
                    .Where(x =>
                        x.Type == DefinitionCacheItemType.Script ||
                        x.Type == DefinitionCacheItemType.LanguageScript);
            foreach (var script in definitions) {
                var dir = Path.GetDirectoryName(script.Location);
                var name = Path.GetFileNameWithoutExtension(script.Location);
                paths.Add(Path.Combine(dir, name + "-files"));
            }
            // Reactive scripts
            var rscripts =
                new ReactiveScriptReader(
                    _token,
                    () => _pluginLocator,
                    (p, m) => {},
                    (m) => {})
                    .Read();
            foreach (var rscript in rscripts) {
                var dir = Path.GetDirectoryName(rscript.File);
                var name = Path.GetFileNameWithoutExtension(rscript.File);
                paths.Add(Path.Combine(dir, name + "-files"));
            }

            var reader = new ConfigOptionsReader(paths.ToArray());
            reader.Parse();
            foreach (var line in reader.Options.OrderBy(x => x))
                Console.WriteLine(line);
        }
Esempio n. 2
0
 private void printConfigurationOptions(string path)
 {
     var file = new Configuration(path, true).ConfigurationFile;
     var paths = new List<string>();
     paths.Add(
         Path.Combine(
             Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
             "EditorEngine"));
     paths.Add(Path.GetDirectoryName(file));
     foreach (var plugin in _pluginLocator.Locate())
         paths.Add(plugin.GetPluginDir());
     var reader = new ConfigOptionsReader(paths.ToArray());
     reader.Parse();
     foreach (var line in reader.Options.OrderBy(x => x))
         Console.WriteLine(line);
 }