22 lines
638 B
C#
22 lines
638 B
C#
using System.IO;
|
|
using NuGet.ProjectModel;
|
|
|
|
namespace RepoTools.BuildGraph
|
|
{
|
|
public class DependencyGraphSpecProvider
|
|
{
|
|
readonly string _packageSpecDirectory;
|
|
|
|
public DependencyGraphSpecProvider(string packageSpecDirectory)
|
|
{
|
|
_packageSpecDirectory = packageSpecDirectory;
|
|
}
|
|
|
|
public DependencyGraphSpec GetDependencyGraphSpec(string repositoryName, string solutionPath)
|
|
{
|
|
var outputFile = Path.Combine(_packageSpecDirectory, repositoryName, Path.GetFileName(solutionPath) + ".json");
|
|
return DependencyGraphSpec.Load(outputFile);
|
|
}
|
|
}
|
|
}
|