private static PackageMetadata GetMetadata(string packagePath) { string[] fileNames = Directory.GetFiles(packagePath, "*.nuspec"); if (fileNames.Length != 1) { return(null); } return(Serialization.Deserialize <NuSpec>(fileNames[0]).Metadata); }
private static PackageManifest GetManifest(string packagePath) { string fileName = Path.Combine(packagePath, PackageManifest.FileName); if (!File.Exists(fileName)) { return(null); } return(Serialization.Deserialize <PackageManifest>(fileName)); }