public IDataSourceViewModel GetOrAddPath(string path)
        {
            IDataSourceViewModel dataSource;

            if (Directory.Exists(path))
            {
                dataSource = _dataSources.GetOrAddFolder(path);
            }
            else
            {
                dataSource = _dataSources.GetOrAddFile(path);
            }

            OpenFile(dataSource);
            return(dataSource);
        }
 public void GetOrAddFolder(string folder)
 {
     CurrentDataSource = _dataSources.GetOrAddFolder(folder);
 }
Exemple #3
0
        public void TestFolderDataSourceCannotBeDragged()
        {
            var folder = _model.GetOrAddFolder("bar");

            _model.CanBeDragged(folder).Should().BeFalse("because folder data sources do not partake in drag 'n drop operations");
        }