Example #1
0
        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);
        }
Example #2
0
        private static PackageManifest GetManifest(string packagePath)
        {
            string fileName = Path.Combine(packagePath, PackageManifest.FileName);

            if (!File.Exists(fileName))
            {
                return(null);
            }

            return(Serialization.Deserialize <PackageManifest>(fileName));
        }