示例#1
0
        public FakeFileSystemBuilder([NotNull] SystemClock systemClock, [NotNull] ILoggedOnUserAccount userAccount)
        {
            Guard.NotNull(systemClock, nameof(systemClock));
            Guard.NotNull(userAccount, nameof(userAccount));

            container = new VolumeContainer(systemClock, changeTracker, userAccount);
        }
示例#2
0
        public VolumeContainer([NotNull] SystemClock systemClock, [NotNull] FakeFileSystemChangeTracker changeTracker,
                               [NotNull] ILoggedOnUserAccount loggedOnAccount)
        {
            Guard.NotNull(systemClock, nameof(systemClock));
            Guard.NotNull(changeTracker, nameof(changeTracker));
            Guard.NotNull(loggedOnAccount, nameof(loggedOnAccount));

            SystemClock          = systemClock;
            ChangeTracker        = changeTracker;
            this.loggedOnAccount = loggedOnAccount;
        }
示例#3
0
        protected DirectoryEntry([NotNull] string name, FileAttributes attributes, [CanBeNull] DirectoryEntry parent,
                                 [CanBeNull] VolumeEntry root, [NotNull] FakeFileSystemChangeTracker changeTracker, [NotNull] SystemClock systemClock,
                                 [NotNull] ILoggedOnUserAccount loggedOnAccount)
            : base(name, attributes, changeTracker, loggedOnAccount)
        {
            Guard.NotNull(systemClock, nameof(systemClock));

            Parent        = parent;
            Root          = root ?? (VolumeEntry)this;
            SystemClock   = systemClock;
            PathFormatter = new DirectoryEntryPathFormatter(this);

            if (parent?.IsEncrypted == true)
            {
                SetEncrypted();
            }

            CreationTimeUtc = systemClock.UtcNow();
            UpdateLastWriteLastAccessTime();
        }
示例#4
0
 public FakeFileSystemBuilder([NotNull] ILoggedOnUserAccount userAccount)
     : this(DefaultTestClock, userAccount)
 {
 }