40 lines
1 KiB
C#
40 lines
1 KiB
C#
namespace FrostFS.SDK.Client;
|
|
|
|
public readonly struct PrmContainerGet(FrostFsContainerId container, string[]? xheaders = null) : System.IEquatable<PrmContainerGet>
|
|
{
|
|
public FrostFsContainerId Container { get; } = container;
|
|
|
|
/// <summary>
|
|
/// FrostFS request X-Headers
|
|
/// </summary>
|
|
public string[] XHeaders { get; } = xheaders ?? [];
|
|
|
|
public override readonly bool Equals(object obj)
|
|
{
|
|
if (obj == null || obj is not PrmContainerGet)
|
|
return false;
|
|
|
|
return Equals((PrmContainerGet)obj);
|
|
}
|
|
|
|
public readonly bool Equals(PrmContainerGet other)
|
|
{
|
|
return GetHashCode() == other.GetHashCode();
|
|
}
|
|
|
|
public override readonly int GetHashCode()
|
|
{
|
|
return Container.GetHashCode()
|
|
^ XHeaders.GetHashCode();
|
|
}
|
|
|
|
public static bool operator ==(PrmContainerGet left, PrmContainerGet right)
|
|
{
|
|
return left.Equals(right);
|
|
}
|
|
|
|
public static bool operator !=(PrmContainerGet left, PrmContainerGet right)
|
|
{
|
|
return !(left == right);
|
|
}
|
|
}
|