public PackageInfo Deserialize(KeyValuePair <string, string> spec) { var dep = new PackageInfo(); dep.DownloadUrl = new Uri(spec.Key); dep.Constraint = VersionConstraintParser.Parse(spec.Value); return(dep); }
public PackageInfo Deserialize(XmlElement spec) { var dep = new PackageInfo(); dep.DownloadUrl = new Uri(spec.GetAttribute("Include")); dep.Constraint = spec.HasAttribute("Version") ? VersionConstraintParser.Parse(spec.GetAttribute("Version")) : null; throw new NotImplementedException(); }