Ejemplo n.º 1
0
        /// <summary>
        /// Retrieves the package's ID
        /// </summary>
        /// <param name="specDoc">
        /// The nuspec document
        /// </param>
        /// <returns>
        /// The package ID, after replacements have been applied
        /// </returns>
        String GetPackageID(XDocument specDoc)
        {
            var id = specDoc
                     .Root
                     .Elements()
                     .Single(e => e.Name.LocalName == "metadata")
                     .Elements()
                     .Single(e => e.Name.LocalName == "id")
                     .Value;

            id = propertyProvider.Process(id);
            return(id);
        }
 public new Stream GetStream() =>
 _tokenRegex.Replace(propertyProvider.Process(base.GetStream().ReadToEnd()),
                     match => "$" + match.Groups["propertyName"].Value + "$").AsStream();