Ejemplo n.º 1
0
        public CurrentDirectoryManager([NotNull] VolumeContainer container)
        {
            Guard.NotNull(container, nameof(container));
            this.container = container;

            ICollection <VolumeEntry> drives = container.FilterDrives();

            AssertFileSystemContainsDrives(drives);

            VolumeEntry drive = drives.First();

            path = new AbsolutePath(drive.Name);
        }
Ejemplo 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);
        }
Ejemplo n.º 3
0
 internal FakeDirectoryInfo([NotNull] VolumeContainer container, [NotNull] FakeFileSystem owner,
                            [NotNull] AbsolutePath path, [CanBeNull] string displayPath)
     : base(container, owner, path, displayPath)
 {
 }
Ejemplo n.º 4
0
 protected FakeOperationHandler([NotNull] VolumeContainer container)
 {
     Guard.NotNull(container, nameof(container));
     Container = container;
 }