Ejemplo n.º 1
0
        public LogNavigatorViewModel(ISelectDirectoryService selectDirectoryService, IMessageService messageService, IAppDataService appDataService,
            IFileBrowserService fileBrowserService, IFileBrowserConfigurationService fileBrowserConfigurationService, IFileNodeService fileNodeService)
        {
            Argument.IsNotNull(() => selectDirectoryService);
            Argument.IsNotNull(() => messageService);
            Argument.IsNotNull(() => appDataService);
            Argument.IsNotNull(() => fileBrowserConfigurationService);
            Argument.IsNotNull(() => fileNodeService);

            _selectDirectoryService = selectDirectoryService;
            _messageService = messageService;
            _appDataService = appDataService;
            _fileBrowserConfigurationService = fileBrowserConfigurationService;
            _fileNodeService = fileNodeService;

            FileBrowser = fileBrowserService.FileBrowserModel;

            AddFolder = new Command(OnAddFolderExecute);
            DeleteFolder = new Command(OnDeleteFolderExecute, OnDeleteFolderCanExecute);
        }
        public LogNavigatorViewModel(ISelectDirectoryService selectDirectoryService, IMessageService messageService, IAppDataService appDataService,
                                     IFileBrowserService fileBrowserService, IFileBrowserConfigurationService fileBrowserConfigurationService, IFileNodeService fileNodeService)
        {
            Argument.IsNotNull(() => selectDirectoryService);
            Argument.IsNotNull(() => messageService);
            Argument.IsNotNull(() => appDataService);
            Argument.IsNotNull(() => fileBrowserConfigurationService);
            Argument.IsNotNull(() => fileNodeService);

            _selectDirectoryService          = selectDirectoryService;
            _messageService                  = messageService;
            _appDataService                  = appDataService;
            _fileBrowserConfigurationService = fileBrowserConfigurationService;
            _fileNodeService                 = fileNodeService;

            FileBrowser = fileBrowserService.FileBrowserModel;

            AddFolder    = new Command(OnAddFolderExecute);
            DeleteFolder = new Command(OnDeleteFolderExecute, OnDeleteFolderCanExecute);
        }
Ejemplo n.º 3
0
        public FileSystemService(IDispatcherService dispatcherService, IFileNodeService fileNodeService, IFileSystemWatchingService fileSystemWatchingService,
                                 INavigationNodeCacheService navigationNodeCacheService, IFilterService filterService, IFileBrowserService fileBrowserService)
        {
            Argument.IsNotNull(() => dispatcherService);
            Argument.IsNotNull(() => fileNodeService);
            Argument.IsNotNull(() => fileSystemWatchingService);
            Argument.IsNotNull(() => navigationNodeCacheService);
            Argument.IsNotNull(() => filterService);
            Argument.IsNotNull(() => fileBrowserService);

            _dispatcherService          = dispatcherService;
            _fileNodeService            = fileNodeService;
            _fileSystemWatchingService  = fileSystemWatchingService;
            _navigationNodeCacheService = navigationNodeCacheService;
            _filterService      = filterService;
            _fileBrowserService = fileBrowserService;

            Filter = "*.log";

            fileSystemWatchingService.ContentChanged += OnFolderContentChanged;
        }
Ejemplo n.º 4
0
        public FileSystemService(IDispatcherService dispatcherService, IFileNodeService fileNodeService, IFileSystemWatchingService fileSystemWatchingService,
            INavigationNodeCacheService navigationNodeCacheService, IFilterService filterService, IFileBrowserService fileBrowserService)
        {
            Argument.IsNotNull(() => dispatcherService);
            Argument.IsNotNull(() => fileNodeService);
            Argument.IsNotNull(() => fileSystemWatchingService);
            Argument.IsNotNull(() => navigationNodeCacheService);
            Argument.IsNotNull(() => filterService);
            Argument.IsNotNull(() => fileBrowserService);

            _dispatcherService = dispatcherService;
            _fileNodeService = fileNodeService;
            _fileSystemWatchingService = fileSystemWatchingService;
            _navigationNodeCacheService = navigationNodeCacheService;
            _filterService = filterService;
            _fileBrowserService = fileBrowserService;

            Filter = "*.log";

            fileSystemWatchingService.ContentChanged += OnFolderContentChanged;
        }
Ejemplo n.º 5
0
 public static async Task ReloadFileNodeAsync(this IFileNodeService fileNodeService, FileNode fileNode)
 {
     await Task.Factory.StartNew(() => fileNodeService.ReloadFileNode(fileNode));
 }
Ejemplo n.º 6
0
 public static async Task <FileNode> CreateFileNodeAsync(this IFileNodeService fileNodeService, string fileName)
 {
     return(await Task.Factory.StartNew(() => fileNodeService.CreateFileNode(fileName)));
 }