dotnet-installer/tools/MultiProjectValidator/AnalysisRules/DependencyMismatch/DependencyInfo.cs
Andrew Stanton-Nurse 845f2c56e6 let RID detection do its thing
also:
* fix up pjvalidate to handle versionless deps
* fix up package-command-test
2016-01-14 09:06:13 -08:00

22 lines
703 B
C#

using System;
using Microsoft.DotNet.ProjectModel;
namespace MultiProjectValidator.AnalysisRules.DependencyMismatch
{
internal class DependencyInfo
{
public static DependencyInfo Create(ProjectContext context, LibraryDescription library)
{
return new DependencyInfo
{
ProjectPath = context.ProjectFile.ProjectFilePath,
Version = library.Identity.Version?.ToString() ?? String.Empty,
Name = library.Identity.Name
};
}
public string ProjectPath { get; private set; }
public string Version { get; private set; }
public string Name { get; private set; }
}
}