示例#1
0
        public async Task LoadRootDirectory()
        {
            this.RootDeviceDirectory =
                this._browserElementFactory.CreateRootDeviceDirectoryBrowserElement();

            await this.RootDeviceDirectory?.Load();
        }
示例#2
0
 protected BrowserElementBase(string elementPath, string name, IDeviceDirectory parentDirectory)
 {
     this.ElementPath     = elementPath;
     this.Name            = name;
     this.ParentDirectory = parentDirectory;
 }
示例#3
0
 public DeviceFile(string elementPath, IFileLoader fileLoader, string name, IDeviceDirectory deviceDirectory) : base(elementPath, name, deviceDirectory)
 {
     _fileLoader = fileLoader;
 }
示例#4
0
        public async Task <List <IDeviceBrowserElement> > LoadDeviceDirectory(string directoryPath, IDeviceDirectory parentDeviceDirectory)
        {
            List <IDeviceBrowserElement> deviceBrowserElements = new List <IDeviceBrowserElement>();

            //List<string> directoryList = await this._fileDriver.GetDirectoryByPath(directoryPath);
            //directoryList.ForEach((path =>
            //    deviceBrowserElements.Add(this._browserElementFactory.CreateBrowserElement(path, parentDeviceDirectory))));
            //foreach (IDeviceBrowserElement element in deviceBrowserElements)
            //{
            //    if (element is IDeviceDirectory)
            //    {
            //        await (element as IDeviceDirectory).Load();
            //    }
            //}
            return(deviceBrowserElements);
        }
示例#5
0
 public DeviceDirectory(string directoryPath, IDirectoryLoader directoryLoader, string name, IDeviceDirectory deviceDirectory)
     : base(directoryPath, name, deviceDirectory)
 {
     this._directoryLoader = directoryLoader;
 }