Ejemplo n.º 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;
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }