1
0

40 lines
951 B
C#

namespace Flawless.Core.Modal;
[Serializable]
public struct WorkspaceFile : IEquatable<WorkspaceFile>
{
public DateTime ModifyTime { get; set; }
public string WorkPath { get; set; }
public WorkspaceFile(DateTime modifyTime, string workPath)
{
ModifyTime = modifyTime;
WorkPath = workPath;
}
public bool Equals(WorkspaceFile other)
{
return ModifyTime.Equals(other.ModifyTime) && WorkPath == other.WorkPath;
}
public override bool Equals(object? obj)
{
return obj is WorkspaceFile other && Equals(other);
}
public override int GetHashCode()
{
return HashCode.Combine(ModifyTime, WorkPath);
}
public static bool operator ==(WorkspaceFile left, WorkspaceFile right)
{
return left.Equals(right);
}
public static bool operator !=(WorkspaceFile left, WorkspaceFile right)
{
return !left.Equals(right);
}
}