public async Task LoadRootDirectory() { this.RootDeviceDirectory = this._browserElementFactory.CreateRootDeviceDirectoryBrowserElement(); await this.RootDeviceDirectory?.Load(); }
protected BrowserElementBase(string elementPath, string name, IDeviceDirectory parentDirectory) { this.ElementPath = elementPath; this.Name = name; this.ParentDirectory = parentDirectory; }
public DeviceFile(string elementPath, IFileLoader fileLoader, string name, IDeviceDirectory deviceDirectory) : base(elementPath, name, deviceDirectory) { _fileLoader = fileLoader; }
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); }
public DeviceDirectory(string directoryPath, IDirectoryLoader directoryLoader, string name, IDeviceDirectory deviceDirectory) : base(directoryPath, name, deviceDirectory) { this._directoryLoader = directoryLoader; }