Esempio n. 1
0
        internal FakeFileSystem([NotNull] DirectoryEntry root, [NotNull] WaitIndicator copyWaitIndicator)
        {
            Guard.NotNull(root, nameof(root));
            this.root = root;

            File      = new FileOperationLocker <FakeFile>(this, new FakeFile(root, this));
            Directory = new DirectoryOperationLocker <FakeDirectory>(this, new FakeDirectory(root, this));
            CurrentDirectoryManager = new CurrentDirectoryManager(root);
            relativePathConverter   = new RelativePathConverter(CurrentDirectoryManager);
            CopyWaitIndicator       = copyWaitIndicator;
        }
Esempio n. 2
0
        internal FakeFileSystem([NotNull] VolumeContainer container, [NotNull] string tempDirectory,
                                [NotNull] WaitIndicator copyWaitIndicator)
        {
            Guard.NotNull(container, nameof(container));
            Guard.NotNull(copyWaitIndicator, nameof(copyWaitIndicator));

            this.container    = container;
            TempDirectory     = tempDirectory;
            CopyWaitIndicator = copyWaitIndicator;

            File      = new FileOperationLocker <FakeFile>(container.FileSystemLock, new FakeFile(container, this));
            Directory = new DirectoryOperationLocker <FakeDirectory>(container.FileSystemLock, new FakeDirectory(container, this));
            Drive     = new DriveOperationLocker <FakeDrive>(container.FileSystemLock, new FakeDrive(container, this));
            Path      = new PathOperationLocker <FakePath>(container.FileSystemLock, new FakePath(container, this));
            CurrentDirectoryManager = new CurrentDirectoryManager(container);
            relativePathConverter   = new RelativePathConverter(CurrentDirectoryManager);
            RandomNumberGenerator   = CreateRandomNumberGenerator(container.SystemClock);
        }
Esempio n. 3
0
        public RelativePathConverter([NotNull] CurrentDirectoryManager currentDirectoryManager)
        {
            Guard.NotNull(currentDirectoryManager, nameof(currentDirectoryManager));

            this.currentDirectoryManager = currentDirectoryManager;
        }