code: public Set<DependencyInfo> parsePackagesConfigFile(boolean getDependenciesFromReferenceTag, String nugetDependencyFile) {
          Persister persister = new Persister();
          Set<DependencyInfo> dependencies = new HashSet<>();
          try {
              // case of packages.config file
              if (this.nugetConfigFileType == NugetConfigFileType.CONFIG_FILE_TYPE) {
                  NugetPackages packages = persister.read(NugetPackages.class, xml);
                  if (!getDependenciesFromReferenceTag) {
                      dependencies.addAll(collectDependenciesFromNugetConfig(packages, nugetDependencyFile));
                  }
                  // case of csproj file
              } else {
                  NugetCsprojPackages csprojPackages = persister.read(NugetCsprojPackages.class, xml);
                  NugetPackages packages = getNugetPackagesFromCsproj(csprojPackages);
                  if (!getDependenciesFromReferenceTag) {
                      dependencies.addAll(collectDependenciesFromNugetConfig(packages, nugetDependencyFile));
                  }
                  dependencies.addAll(getDependenciesFromReferencesTag(csprojPackages));
              }
              dependencies.stream().forEach(dependencyInfo -> dependencyInfo.setSystemPath(this.xml.getPath()));
          } catch (Exception e) {
              logger.warn("Unable to parse suspected Nuget package configuration file {}", xml, e.getMessage());
          }
          return dependencies;
      }
docs: Parse packages.config or csproj file
  
  @param getDependenciesFromReferenceTag - flag to indicate weather to get dependencies form reference tag or not
  @return Set of DependencyInfos