public OptionsFactory() { OptionsPath = Extensions.GetCommonApplicationDataFolder(true) + "\\WatcherOptions.xml"; Options = new OptionsList(); Options.WatcherFolderOptions = new List <WatcherFolderOption>(); Options.EventExecutables = new List <EventExecutable>(); }
public List <EventExecutable> GetEventExecutableByFolderGuid(OptionsList Options, string Guid) { List <EventExecutable> eventExecutables = new List <EventExecutable>(); if (Options.EventExecutables.Any(e => e.WatcherOptionGUID == Guid)) { eventExecutables = Options.EventExecutables.Where(e => e.WatcherOptionGUID == Guid).ToList(); } return(eventExecutables); }
public OptionsList CreateNewEventExecutable(OptionsList Options, string FolderGuid, WatcherChangeTypes watcherChangeTypes, string ExecutablePath, string ExecutableArgs) { EventExecutable eventExecutable = new EventExecutable(); eventExecutable.WatcherOptionGUID = FolderGuid; eventExecutable.ExecutableArgs = ExecutableArgs; eventExecutable.ExecutablePath = ExecutablePath; eventExecutable.WatcherChangeType = watcherChangeTypes; Options.EventExecutables.Add(eventExecutable); return(Options); }