* @param[in] tpa list
* @return std::vector<std::string> parser data
*/
-std::vector<std::string> depsJsonParser(std::string rootPath, std::string execName, std::string tpaList);
+std::vector<std::string> depsJsonParser(const std::string& rootPath, const std::string& execName, const std::string& tpaList);
#endif /* __TAC_COMMON_H__ */
* @param[in] replacement string
* return the modified string
*/
-std::string replaceAll(const std::string &str, const std::string &pattern, const std::string &replace);
+std::string replaceAll(const std::string& str, const std::string& pattern, const std::string& replace);
/**
* @brief get root path
* @param[in] package id
* @param[out] root path
*/
-int getRootPath(std::string pkgId, std::string& rootPath);
+int getRootPath(const std::string& pkgId, std::string& rootPath);
/**
* @brief get exec name
* @param[in] package id
* @param[out] exec name
*/
-int getExecName(std::string pkgId, std::string& execName);
+int getExecName(const std::string& pkgId, std::string& execName);
/**
* @brief get metadata value
* @param[in] metadata key
* @param[out] metadata value
*/
-int getMetadataValue(std::string pkgId, std::string metadataKey, std::string& metadataValue);
+int getMetadataValue(const std::string& pkgId, const std::string& metadataKey, std::string& metadataValue);
/**
* @brief split path with ":" delimiter and put that in the vector
}
//Parser the .deps.json file to get nuget information.
-std::vector<std::string> depsJsonParser(std::string rootPath, std::string execName, std::string tpaList)
+std::vector<std::string> depsJsonParser(const std::string& rootPath, const std::string& execName, const std::string& tpaList)
{
std::vector<std::string> tpaAssemblies;
splitPath(tpaList, tpaAssemblies);
return absPath;
}
-int getRootPath(std::string pkgId, std::string& rootPath)
+int getRootPath(const std::string& pkgId, std::string& rootPath)
{
int ret = 0;
char *path = 0;
return 0;
}
-int getExecName(std::string pkgId, std::string& execName)
+int getExecName(const std::string& pkgId, std::string& execName)
{
char *exec = NULL;
char *appId = 0;
return 0;
}
-int getMetadataValue(std::string pkgId, std::string metadataKey, std::string& metadataValue)
+int getMetadataValue(const std::string& pkgId, const std::string& metadataKey, std::string& metadataValue)
{
char *value = NULL;
char *appId = 0;
return path;
}
-std::string replaceAll(const std::string &str, const std::string &pattern, const std::string &replace)
+std::string replaceAll(const std::string& str, const std::string& pattern, const std::string& replace)
{
std::string result = str;
std::string::size_type pos = 0;