private static bool EqualsExtracted(ReadOnlyStructNeedle <T> left, ReadOnlyStructNeedle <T> right) { var leftValue = left._value; if (left.IsAlive) { var rightValue = right._value; return(right.IsAlive && EqualityComparer <T> .Default.Equals(leftValue, rightValue)); } return(!right.IsAlive); }
public bool Equals(ReadOnlyStructNeedle <T> other) { return(EqualsExtracted(this, other)); }