public CommandSubscriber(ShareFolderBase shareFolder, ICommandJsonSerializer ser, CommandFileFilter filter)
        {
            _shareFolder = shareFolder ?? throw new ArgumentNullException(nameof(shareFolder));
            _ser         = ser ?? throw new ArgumentNullException(nameof(ser));
            _filter      = filter;

            _folderWatcher = new FileSystemWatcher
            {
                Path   = _shareFolder.GetPath(),
                Filter = $"*{CommandNameHelper.CommandFileExtensionName}"
            };
            _folderWatcher.Created += FolderWatcher_Created;
        }
Exemple #2
0
 public CommandSender(ShareFolderBase shareFolder, ICommandJsonSerializer ser)
 {
     _shareFolder = shareFolder ?? throw new ArgumentNullException(nameof(shareFolder));
     _ser         = ser ?? throw new ArgumentNullException(nameof(ser));
 }