private string GetCommandFilePath(string nugetPackagesRoot, LockFileTargetLibrary toolLibrary, LockFileItem runtimeAssembly) { var packageDirectory = new VersionFolderPathResolver(nugetPackagesRoot) .GetInstallPath(toolLibrary.Name, toolLibrary.Version); var filePath = Path.Combine(packageDirectory, runtimeAssembly.Path); return filePath; }
private static LockFileItem ReadFileItem(string property, JsonValue json) { var item = new LockFileItem { Path = PathUtility.GetPathWithDirectorySeparator(property) }; var jobject = json as JsonObject; if (jobject != null) { foreach (var subProperty in jobject.Keys) { item.Properties[subProperty] = jobject.ValueAsString(subProperty); } } return(item); }
private LockFileItem ReadFileItem(string property, JToken json) { var item = new LockFileItem { Path = _symbols.GetString(PathUtility.GetPathWithDirectorySeparator(property)) }; var jobject = json as JObject; if (jobject != null) { foreach (var child in jobject) { item.Properties[_symbols.GetString(child.Key)] = jobject.Value <string>(child.Key); } } return(item); }