Esempio n. 1
0
        private void HandleFileSystemEvent(FileSystemEventArgs a)
        {
            Initialize();

            var fileInfo = FileInfo.Create(GetRootPath(PathInfo.GetSubPath(_basePath, a.FullPath)));

            NotifySubscriptions(fileInfo);
        }
Esempio n. 2
0
        private void InitializeFilesAndDirectories(string basePath)
        {
            _fileInfo.UnionWith(new HashSet <PathInfo>(
                                    Directory.EnumerateFiles(basePath, "*", SearchOption.AllDirectories)
                                    .Select(fileName => PathInfo.GetSubPath(_basePath, fileName))));

            _directoryInfo.UnionWith(new HashSet <PathInfo>(
                                         Directory.EnumerateDirectories(basePath, "*", SearchOption.AllDirectories)
                                         .Select(fileName => PathInfo.GetSubPath(_basePath, fileName))));
        }