예제 #1
0
        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;
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }