Exemple #1
0
        private static void RegisterExtensions(ExtensionFinder finder, AggregateCatalog catalog, string logName)
        {
            var directories = finder.GetDirectories()
                              .Where(dir => Directory.Exists(Path.Combine(dir, "bin")));

            if (directories.Count() > 0)
            {
                Log.Debug("Installed {0}:", logName);
                foreach (var dir in directories)
                {
                    Log.Debug("- {0}", Path.GetFileName(dir));
                    catalog.Catalogs.Add(new DirectoryCatalog(Path.Combine(dir, "bin")));
                }
            }
        }
Exemple #2
0
        private static List <string> RegisterExtensions(ExtensionFinder finder, PluginLoader loader, string logName, bool requireBinary)
        {
            var directories = finder.GetDirectories()
                              .Where(dir => !requireBinary || Directory.Exists(Path.Combine(dir, "bin")));

            if (directories.Count() > 0)
            {
                Log.Debug("Installed {0}:", logName);
                foreach (var dir in directories)
                {
                    bool hasBinary = Directory.Exists(Path.Combine(dir, "bin"));
                    Log.Debug("- {0} {1}", Path.GetFileName(dir), hasBinary ? " (with binary)" : "");
                    if (hasBinary)
                    {
                        loader.AddDirectory(Path.Combine(dir, "bin"), true);
                    }
                }
            }

            return(directories
                   .Select(x => Path.GetFileName(x))
                   .ToList());
        }
Exemple #3
0
        private static List<string> RegisterExtensions(ExtensionFinder finder, PluginLoader loader, string logName, bool requireBinary)
        {
            var directories = finder.GetDirectories()
                .Where(dir => !requireBinary || Directory.Exists(Path.Combine(dir, "bin")));

            if (directories.Count() > 0)
            {
                Log.Debug("Installed {0}:", logName);
                foreach (var dir in directories)
                {
                    bool hasBinary = Directory.Exists(Path.Combine(dir, "bin"));
                    Log.Debug("- {0} {1}", Path.GetFileName(dir), hasBinary ? " (with binary)" : "");
                    if (hasBinary)
                        loader.AddDirectory(Path.Combine(dir, "bin"), true);
                }
            }

            return directories
                .Select(x => Path.GetFileName(x))
                .ToList();
        }
Exemple #4
0
        private static void RegisterExtensions(ExtensionFinder finder, AggregateCatalog catalog, string logName)
        {
            var directories = finder.GetDirectories()
                .Where(dir => Directory.Exists(Path.Combine(dir, "bin")));

            if (directories.Count() > 0)
            {
                Log.Debug("Installed {0}:", logName);
                foreach (var dir in directories)
                {
                    Log.Debug("- {0}", Path.GetFileName(dir));
                    catalog.Catalogs.Add(new DirectoryCatalog(Path.Combine(dir, "bin")));
                }
            }
        }