public async void fillGetRootsGrid(IRootInfo[] roots, string directoryPath, string filePath) { var getFileSystemNameAsync = await _virtualFileSystem.GetFileSystemNameAsync(); var isDirectoryExistAsync = await _virtualFileSystem.DirectoryExistsAsync(directoryPath); var isFileExistAsync = await _virtualFileSystem.FileExistsAsync(filePath); var rootsResult = roots.Select(r => new { Caption = r.Caption, FullPath = r.FullPath, ID = r.ID, VirtualPath = r.VirtualPath, GetFileSystemName = getFileSystemNameAsync, IsDirectoryExist = isDirectoryExistAsync, IsFileExist = isFileExistAsync, }).ToList(); getRootsGrid.DataSource = rootsResult; }