public List <AExplorerTreeChildItemModel> FilesToFileItemModel(List <string> files, IExplorerTreeItemModel parentItem) { List <AExplorerTreeChildItemModel> returnList = new List <AExplorerTreeChildItemModel>(); foreach (var file in files) { FileItemModel fileItemModel = new FileItemModel(); fileItemModel.FileInfo = new FileInfo(file); fileItemModel.IsHidden = this.CheckIfFileOrDirectoryIsHidden(fileItemModel.FileInfo.Attributes); fileItemModel.FullName = file; fileItemModel.Name = Path.GetFileName(file); fileItemModel.IconModel = IconModelParser.ParseIconModel(fileItemModel.IconModel, file); fileItemModel.ParentItem = parentItem; returnList.Add(fileItemModel); } return(returnList); }
public List <AExplorerTreeChildItemModel> DirectoriesToDirectoryItemModel(List <string> directories, IExplorerTreeItemModel parentItem) { List <AExplorerTreeChildItemModel> returnList = new List <AExplorerTreeChildItemModel>(); foreach (var directory in directories) { DirectoryItemModel directoryItemModel = new DirectoryItemModel(); directoryItemModel.DirectoryInfo = new DirectoryInfo(directory); directoryItemModel.IsHidden = this.CheckIfFileOrDirectoryIsHidden(directoryItemModel.DirectoryInfo.Attributes); directoryItemModel.FullName = directory; directoryItemModel.Name = Path.GetFileName(directory); directoryItemModel.IconModel = IconModelParser.ParseIconModel(directoryItemModel.IconModel, directory); directoryItemModel.ParentItem = parentItem; returnList.Add(directoryItemModel); } return(returnList); }
internal FileParser(IconModelParser iconModelParser = null) { this.IconModelParser = iconModelParser ?? new IconModelParser(); }
public DriveParser(IconModelParser iconModelParser = null) { this.IconModelParser = iconModelParser ?? new IconModelParser(); }
internal DirectoryParser(IconModelParser iconModelParser = null) { this.IconModelParser = iconModelParser ?? new IconModelParser(); }