Class XPathMSBuildProjectParser


  • public class XPathMSBuildProjectParser
    extends java.lang.Object
    Parses a MSBuild project file for NuGet references using XPath.
    Author:
    paulirwin
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<NugetPackageReference> parse​(java.io.InputStream stream, java.util.Properties props, java.util.Map<java.lang.String,​java.lang.String> centrallyManaged)
      Parses the given stream for MSBuild PackageReference elements.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XPathMSBuildProjectParser

        public XPathMSBuildProjectParser()
    • Method Detail

      • parse

        public java.util.List<NugetPackageReference> parse​(java.io.InputStream stream,
                                                           java.util.Properties props,
                                                           java.util.Map<java.lang.String,​java.lang.String> centrallyManaged)
                                                    throws MSBuildProjectParseException
        Parses the given stream for MSBuild PackageReference elements.
        Parameters:
        stream - the input stream to parse
        props - the Directory.Build.props properties
        centrallyManaged - a map of centrally managed package references
        Returns:
        a collection of discovered NuGet package references
        Throws:
        MSBuildProjectParseException - if an exception occurs