Beispiel #1
0
        public void Start(List<Guid> sitesInAllProfiles, IViewerPlugin viewer)
        {
            lock (_lock_)
            {
                if (IsRunning)
                {
                    throw new Exception("Fetcher is already running");
                }

                this.sitesInAllProfiles = sitesInAllProfiles;
                this.viewer = viewer;

                Start();
            }
        }
Beispiel #2
0
 private static void LoadPlugins(string[] files)
 {
     foreach (string file in files)
     {
         string filename = Path.GetFullPath(file);
         if (IsAssembly(filename))
         {
             var plugins = Assembly.LoadFile(filename).GetTypes().Where((t) => typeof(IViewerPlugin).IsAssignableFrom(t) && t.IsClass);
             foreach (var plugin in plugins)
             {
                 Logger.Log("Loading Plugin - " + plugin.FullName);
                 IViewerPlugin instance = Activator.CreateInstance(plugin) as IViewerPlugin;
                 Plugins.Add(instance);
             }
         }
     }
 }
Beispiel #3
0
        public void Stop()
        {
            lock (_lock_)
            {
                _Stop();

                this.sitesInAllProfiles = null;
                this.viewer = null;
            }
        }