public async Task <PackagesFileResult <IPackage> > ParseFileAsync(string filePath, string fileName = null)
        {
            if (string.IsNullOrEmpty(fileName))
            {
                fileName = Path.GetFileName(filePath);
            }

            IFileParser fileParser = FileParserFactory.CreateParser(fileName);
            IEnumerable <PackageMetadata> packagesMetadata = fileParser.GetPackages(filePath);

            List <Task <NuGetPackage> > tasks = new List <Task <NuGetPackage> >();

            foreach (var item in packagesMetadata)
            {
                tasks.Add(_nuGetPackagesRepository.FindPackageAsync(item.PackageId, item.Version));
            }

            await Task.WhenAll(tasks);

            List <NuGetPackage> packages = tasks.Select(p => p.Result).ToList();

            return(new PackagesFileResult <IPackage>
            {
                PackageType = fileParser.PackageType,
                FileName = fileName,
                Packages = packages.OrderBy(p => p.PackageId).ToList()
            });
        }