You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
970 B
45 lines
970 B
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) |
|
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt) |
|
|
|
using System; |
|
using NuGet; |
|
|
|
namespace ICSharpCode.PackageManagement |
|
{ |
|
public class RecentPackageInfo |
|
{ |
|
Version version; |
|
|
|
public RecentPackageInfo() |
|
{ |
|
} |
|
|
|
public RecentPackageInfo(IPackage package) |
|
: this(package.Id, package.Version) |
|
{ |
|
} |
|
|
|
public RecentPackageInfo(string id, Version version) |
|
{ |
|
this.Id = id; |
|
this.version = version; |
|
} |
|
|
|
public string Id { get; set; } |
|
|
|
public string Version { |
|
get { return version.ToString(); } |
|
set { version = new Version(value); } |
|
} |
|
|
|
public override string ToString() |
|
{ |
|
return String.Format("[RecentPackageInfo Id={0}, Version={1}]", Id, Version); |
|
} |
|
|
|
public bool IsMatch(IPackage package) |
|
{ |
|
return (package.Version.ToString() == Version) && (package.Id == Id); |
|
} |
|
} |
|
}
|
|
|