Ejemplo n.º 1
0
 public OptionsFactory()
 {
     OptionsPath = Extensions.GetCommonApplicationDataFolder(true) + "\\WatcherOptions.xml";
     Options     = new OptionsList();
     Options.WatcherFolderOptions = new List <WatcherFolderOption>();
     Options.EventExecutables     = new List <EventExecutable>();
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }