lib/spandx/dotnet/parsers/csproj.rb in spandx-0.13.3 vs lib/spandx/dotnet/parsers/csproj.rb in spandx-0.13.4

- old
+ new

@@ -2,25 +2,25 @@ module Spandx module Dotnet module Parsers class Csproj < ::Spandx::Core::Parser - def matches?(filename) - ['.csproj', '.props'].include?(File.extname(filename)) + def match?(path) + ['.csproj', '.props'].include?(path.extname) end - def parse(lockfile) + def parse(path) ProjectFile - .new(lockfile) + .new(path) .package_references - .map { |x| map_from(x) } + .map { |x| map_from(path, x) } end private - def map_from(package_reference) + def map_from(path, package_reference) ::Spandx::Core::Dependency.new( - package_manager: :nuget, + path: path, name: package_reference.name, version: package_reference.version, meta: package_reference ) end