add equals to intstr
This commit is contained in:
@@ -52,5 +52,23 @@ namespace k8s.Models
|
||||
{
|
||||
return new IntstrIntOrString(v);
|
||||
}
|
||||
|
||||
protected bool Equals(IntstrIntOrString other)
|
||||
{
|
||||
return string.Equals(Value, other.Value);
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (ReferenceEquals(null, obj)) return false;
|
||||
if (ReferenceEquals(this, obj)) return true;
|
||||
if (obj.GetType() != this.GetType()) return false;
|
||||
return Equals((IntstrIntOrString) obj);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return (Value != null ? Value.GetHashCode() : 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user