This repository has been archived on 2025-09-07. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
dotnet-installer/tools/MultiProjectValidator/AnalysisRules/DependencyMismatch/DependencyInfo.cs

23 lines
703 B
C#
Raw Normal View History

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; }
}
}