Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.FSharp.Collections;
using Microsoft.FSharp.Core;
using NuKeeper.Abstractions.Inspections.Files;
using Paket;
namespace NuKeeper.Inspection.RepositoryInspection
{
public class PaketRepositoryScanner : IRepositoryScanner
{
private readonly IReadOnlyCollection<IPackageReferenceFinder> _finders;
public PaketRepositoryScanner(ProjectFileReader projectFileReader, PackagesFileReader packagesFileReader,
NuspecFileReader nuspecFileReader, DirectoryBuildTargetsReader directoryBuildTargetsReader)
{
_finders = new IPackageReferenceFinder[]
{projectFileReader, packagesFileReader, nuspecFileReader, directoryBuildTargetsReader};
}
public IReadOnlyCollection<PackageInProject> FindAllNuGetPackages(IFolder workingFolder)
{
var dirInfo = new DirectoryInfo(workingFolder.FullPath);
var dependenciesFile = new DependenciesFile(workingFolder.FullPath + ".paket/paket.dependencies", null,null);
var lockFile = FSharpOption<LockFile>.None;
var project = FSharpList<Tuple<ProjectFile, ReferencesFile>>.Empty;
var env = new PaketEnv(dirInfo, dependenciesFile, lockFile, project);
var packages = Paket.FindOutdated.FindOutdated(false,false,true, FSharpOption<string>.None, env);
return null;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.