public EffectPluginTester() { InitializeComponent(); reader = new PluginReader(); pluginRunner = new PluginRunner(); }
public override bool Run() { Guard.AgainstException<RuntimeBinderException>(() => this.folderToWatch = parameters.FolderToWatch, "The FolderToWatch parameter was not found in the parameters. Ensure that the configuration file is correct."); Guard.Catch<RuntimeBinderException>(() => { if (bool.Parse(parameters.VerboseOutput)) { pluginRunner = new VerboseOutputPluginRunner(pluginRunner, notificationService); } }); if (!Directory.Exists(folderToWatch)) { notificationService.Notify(this.GetType().Name, String.Format("The directory {0} does not exist and cannot be watched", folderToWatch), NotificationType.Information); return false; } fileSystemWatcher = new FileSystemWatcher(folderToWatch, "*.*"); fileSystemWatcher.IncludeSubdirectories = true; fileSystemWatcher.EnableRaisingEvents = true; fileSystemWatcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.FileName | NotifyFilters.DirectoryName; fileSystemWatcher.Changed += new FileSystemEventHandler(FileSystemChanged); fileSystemWatcher.Created += new FileSystemEventHandler(FileSystemChanged); fileSystemWatcher.Renamed += FileSystemChanged; notificationService.Notify(String.Format("watching {0}", folderToWatch)); return true; }
public JobExecuter(IInstanceService instanceService, IPluginRunner pluginRunner, IJobRepository jobRepository, IJobSessionRepository jobSessionRepository, IJobScheduleRepository jobScheduleRepository, ILogger <JobExecuter> logger, IConfiguration configuration, IWorkloadAnalyzer workloadAnalyzer) { _instanceService = instanceService; _pluginRunner = pluginRunner; _jobRepository = jobRepository; _jobSessionRepository = jobSessionRepository; _jobScheduleRepository = jobScheduleRepository; _logger = logger; _configuration = configuration; _workloadAnalyzer = workloadAnalyzer; }
public VerboseOutputPluginRunner(IPluginRunner pluginRunner, INotificationService notificationService) { this.pluginRunner = pluginRunner; this.notificationService = notificationService; }
public FileSystemWatchingRunner(INotificationService notificationService, IPluginProvider pluginProvider) { this.notificationService = notificationService; this.pluginProvider = pluginProvider; this.pluginRunner = new PluginRunner(); }