Exemplo n.º 1
0
 public HintFileTracker(IStorage storage, IFileEventService fileEventService, ILogger logger)
 {
     _fileEventService = fileEventService;
     _logger           = logger;
     _context          = storage.SqliteContext;
     _databaseTable    = new DatabaseTable("FileTracker");
     Create().AsTask().Wait();
 }
Exemplo n.º 2
0
 public FileSystemServiceProvider(
     FileSystemDescriptor fileSystemDescriptor,
     IFileEventService fileEventService,
     IServiceProvider serviceProvider)
 {
     _fileSystemDescriptor = fileSystemDescriptor;
     _fileEventService     = fileEventService;
     _serviceProvider      = serviceProvider;
 }
Exemplo n.º 3
0
    public LocalFileSystem(
        string rootPath,
        IFileEventService fileEventService,
        ILogger <LocalFileSystem> logger)
    {
        _hintFileTrackerStorage = new HintFileTracker.MemoryStorage();
        _hintFileTracker        = new HintFileTracker(_hintFileTrackerStorage, fileEventService, logger);

        _rootPath      = rootPath;
        _scannerThread = new FileSystemDirectoryWalker(this, LocalFileHandle.Root.FileHandle).StartWalkerThread(HandleScanner);
    }
Exemplo n.º 4
0
    public SingletonFileService(
        IEnumerable <FileSystemDescriptor> fileSystemDescriptors,
        IFileEventService eventService,
        ILogger <SingletonFileService> logger,
        IServiceProvider serviceProvider)
        : base(null)
    {
        _fileSystems = new Dictionary <string, ISingletonFileSystem>();
        foreach (var descriptor in fileSystemDescriptors)
        {
            var fileSystemServiceProvider =
                new FileSystemServiceProvider(descriptor, new WrappedFileEventService(descriptor, eventService), serviceProvider);

            _fileSystems.Add(descriptor.NameSpace, descriptor.ImplementationFactory(fileSystemServiceProvider));
        }

        _logger = logger;
    }
Exemplo n.º 5
0
 public WrappedFileEventService(FileSystemDescriptor descriptor, IFileEventService fileEventService)
 {
     _descriptor       = descriptor;
     _fileEventService = fileEventService;
 }