Fix/add doc comments

This commit is contained in:
Tamas Vajk
2024-08-20 14:35:31 +02:00
parent a0dc20caef
commit 07a5c20309
2 changed files with 8 additions and 4 deletions

View File

@@ -771,15 +771,16 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
}
/// <summary>
/// Computes a unique temp directory for the packages associated
/// with this source tree. Use a SHA1 of the directory name.
/// Returns the full path to a temporary directory with the given subfolder name.
/// </summary>
/// <returns>The full path of the temp directory.</returns>
private static string ComputeTempDirectoryPath(string subfolderName)
{
return Path.Combine(FileUtils.GetTemporaryWorkingDirectory(out _), subfolderName);
}
/// <summary>
/// Computes a unique temporary directory path based on the source directory and the subfolder name.
/// </summary>
private static string ComputeTempDirectoryPath(string srcDir, string subfolderName)
{
return Path.Combine(FileUtils.GetTemporaryWorkingDirectory(out _), FileUtils.ComputeHash(srcDir), subfolderName);

View File

@@ -86,7 +86,7 @@ namespace Semmle.Util
}
/// <summary>
/// Computes the hash of <paramref name="filePath"/>.
/// Computes the hash of the file at <paramref name="filePath"/>.
/// </summary>
public static string ComputeFileHash(string filePath)
{
@@ -95,6 +95,9 @@ namespace Semmle.Util
return GetHashString(sha);
}
/// <summary>
/// Computes the hash of <paramref name="input"/>.
/// </summary>
public static string ComputeHash(string input)
{
var bytes = Encoding.Unicode.GetBytes(input);