Add more diagnostics to FileThumbPrint
This commit is contained in:
parent
84a1aa4160
commit
a1ba1f0f86
|
|
@ -9,12 +9,15 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
{
|
{
|
||||||
public class FileThumbPrint : IEquatable<FileThumbPrint>
|
public class FileThumbPrint : IEquatable<FileThumbPrint>
|
||||||
{
|
{
|
||||||
private FileThumbPrint(DateTime lastWriteTimeUtc, string hash)
|
private FileThumbPrint(string path, DateTime lastWriteTimeUtc, string hash)
|
||||||
{
|
{
|
||||||
|
Path = path;
|
||||||
LastWriteTimeUtc = lastWriteTimeUtc;
|
LastWriteTimeUtc = lastWriteTimeUtc;
|
||||||
Hash = hash;
|
Hash = hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string Path { get; }
|
||||||
|
|
||||||
public DateTime LastWriteTimeUtc { get; }
|
public DateTime LastWriteTimeUtc { get; }
|
||||||
|
|
||||||
public string Hash { get; }
|
public string Hash { get; }
|
||||||
|
|
@ -30,12 +33,14 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
|
|
||||||
var hash = Convert.ToBase64String(hashBytes);
|
var hash = Convert.ToBase64String(hashBytes);
|
||||||
var lastWriteTimeUtc = File.GetLastWriteTimeUtc(path);
|
var lastWriteTimeUtc = File.GetLastWriteTimeUtc(path);
|
||||||
return new FileThumbPrint(lastWriteTimeUtc, hash);
|
return new FileThumbPrint(path, lastWriteTimeUtc, hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Equals(FileThumbPrint other)
|
public bool Equals(FileThumbPrint other)
|
||||||
{
|
{
|
||||||
return LastWriteTimeUtc == other.LastWriteTimeUtc &&
|
return
|
||||||
|
string.Equals(Path, other.Path, StringComparison.Ordinal) &&
|
||||||
|
LastWriteTimeUtc == other.LastWriteTimeUtc &&
|
||||||
string.Equals(Hash, other.Hash, StringComparison.Ordinal);
|
string.Equals(Hash, other.Hash, StringComparison.Ordinal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue