public MainWindowViewModel( IDirectoryWatcher watcher, INotifier toaster, IDirectoryOpener opener, IFilePathInquirer filePathInquirer) { _watcher = watcher; _toaster = toaster; _opener = opener; _filePathInquirer = filePathInquirer; var path = _filePathInquirer.InqueryDirectoryPath(); _watcher.Path = path; _watcher.Filter = "*.*"; _watcher .Throttle(TimeSpan.FromMilliseconds(100)) .Select(e => new StringBuilder() .Append($"{e.Name} ") .Append(e.ChangeType switch { WatcherChangeTypes.Created => "が作られたよ", WatcherChangeTypes.Deleted => "が削除されたよ", WatcherChangeTypes.Changed => "が変更されたよ", WatcherChangeTypes.Renamed => "が改名されたよ", _ => "になんかあったよ" })
public ClipboardDataSaver( IClipboardManager clipboardManager, IDataSaver dataSaver, IFilePathInquirer filePathInquirer, IDialogService dialogService) { _clipboardManager = clipboardManager; _dataSaver = dataSaver; _filePathInquirer = filePathInquirer; _dialogService = dialogService; }