private async Task ShowDirectoryContent(FileItemTargetResolver target) { var provider = new FileItemProvider(Workspace); var items = (await provider.GetItems(target.TargetPath)).ToList(); var highLighter = new SyntaxHighlighter(Encoding.UTF8); highLighter.Init(items.Select(i => i.Name)); var line = 1; Items = items.Select(i => new RtfItem(highLighter, i.Name, line++)); }
protected override Task <IEnumerable <FileItem> > GetItems() { _itemProvider.CancelCurrentTasks(); if (string.IsNullOrEmpty(Path)) { PathName = Constants.RootName; } else if (new Uri(Path).IsUnc&& !Directory.Exists(Path)) { return(NetworkShareProvider.GetItems(Path)); } return(_itemProvider.GetItems(Path)); }