private string GetExactVersion(DependencyManifestEntry entry) { switch (entry.VersionSpecificationType) { case VersionSpecificationType.ExactVersion: return(entry.VersionSpecification); case VersionSpecificationType.MajorVersion: return(GetModuleLatestPublishedVersion(entry.Name, entry.VersionSpecification)); default: throw new ArgumentException($"Unknown version specification type: {entry.VersionSpecificationType}"); } }
private bool IsAcceptableVersionInstalled(string snapshotPath, DependencyManifestEntry dependency) { switch (dependency.VersionSpecificationType) { case VersionSpecificationType.ExactVersion: return(_storage.IsModuleVersionInstalled( snapshotPath, dependency.Name, dependency.VersionSpecification)); case VersionSpecificationType.MajorVersion: return(IsMajorVersionInstalled( snapshotPath, dependency.Name, dependency.VersionSpecification)); default: throw new ArgumentException($"Unknown version specification type: {dependency.VersionSpecificationType}"); } }