Пример #1
0
        public void FilesSource_FullLoadTest()
        {
            var source = new FilesSource("./Directories", true, RuntimeContext.Empty);

            var fired = source.Rows.Count();

            Assert.AreEqual(4, fired);
        }
Пример #2
0
        public void FilesSource_FullLoadTest()
        {
            var source = new FilesSource("./Directories", true, InterCommunicator.Empty);

            var fired = source.Rows.Count();

            Assert.AreEqual(4, fired);
        }
Пример #3
0
        public void FilesSource_CancelledLoadTest()
        {
            var tokenSource = new CancellationTokenSource();

            tokenSource.Cancel();
            var source = new FilesSource("./Directories", true, new InterCommunicator(tokenSource.Token));

            var fired = source.Rows.Count();

            Assert.AreEqual(0, fired);
        }
Пример #4
0
        public void FilesSource_CancelledLoadTest()
        {
            var tokenSource = new CancellationTokenSource();

            tokenSource.Cancel();
            var source = new FilesSource("./Directories", true, new RuntimeContext(tokenSource.Token, new ISchemaColumn[0]));

            var fired = source.Rows.Count();

            Assert.AreEqual(0, fired);
        }
Пример #5
0
        private void InitializeFileSystemObjects()
        {
            var drives = DriveInfo.GetDrives();

            drives.ToList().ForEach(drive =>
            {
                var fileSystemObject            = new FileSystemObjectInfo(drive);
                fileSystemObject.BeforeExplore += FileSystemObject_BeforeExplore;
                fileSystemObject.AfterExplore  += FileSystemObject_AfterExplore;
                FilesSource.Add(fileSystemObject);
            });

            PreSelect(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile));
            //SelectedFileObject =
        }