private void ResolveNuGet3(string workingDirectory, NuGet3PackageMetadata nuGet3Metadata, string folder, string templateName, bool forceUpgrade) { switch (nuGet3Metadata.PackageType) { case PackageManager.PACKAGE_TYPE_LIBRARY: ResolveLibraryBinary(workingDirectory, nuGet3Metadata, Path.Combine(workingDirectory, folder), forceUpgrade, () => { var package = GetBinaryPackage(nuGet3Metadata); if (package == null) { _sourcePackageResolve.Resolve(workingDirectory, nuGet3Metadata, folder, null, forceUpgrade); return(null); } return(package); }); break; case PackageManager.PACKAGE_TYPE_TEMPLATE: ResolveTemplateBinary(workingDirectory, nuGet3Metadata, folder, templateName, forceUpgrade); break; case PackageManager.PACKAGE_TYPE_GLOBAL_TOOL: ResolveGlobalToolBinary(workingDirectory, nuGet3Metadata, forceUpgrade); break; default: throw new InvalidOperationException("Unable to resolve binary package with type '" + nuGet3Metadata.PackageType + "' using Protobuild-based package."); } }
private void ResolveNuGet3(string workingDirectory, NuGet3PackageMetadata protobuildMetadata, string folder, string templateName, bool forceUpgrade) { ResolveGit( workingDirectory, new GitPackageMetadata( protobuildMetadata.SourceUri, protobuildMetadata.CommitHashForSourceResolve, protobuildMetadata.PackageType, (workingDirectoryAlt, metadata, s, name, upgrade, source) => Resolve(workingDirectoryAlt, metadata, s, name, upgrade) ), folder, templateName, forceUpgrade); }