private string GetFileListPreview(ReceivedFileCollection receivedFileCollection) { var files = receivedFileCollection.Files.Select(x => System.IO.Path.GetFileName(x.Name)).OrderBy(x => x).Select(x => Concat(x, 40)).ToList(); var filesPart = (files.Count <= 4) ? files : files.Take(3).Concat(new string[] { $"and {files.Count - 3} other files." }); return($"{string.Join(", ", filesPart)}"); }
public HistoryBrowseAdapter(ReceivedFileCollection fileCollection) { this.fileCollection = fileCollection; CurrentPath = fileCollection.StoreRootPath; }