private bool ResolveEquals(object left, object right, LiteralType type) { if (type == LiteralType.Binary) { return(LiteralUtil.ByteArrayEquals((byte[])left, (byte[])right)); } else { return(Equals(left, right)); } }
public override bool Equals(object obj) { if (ReferenceEquals(this, obj)) { return(true); } var other = obj as LiteralToken; if (other == null) { return(false); } var bytes = Value as byte[]; var otherBytes = other.Value as byte[]; if (bytes != null && otherBytes != null) { return(LiteralUtil.ByteArrayEquals(bytes, otherBytes)); } return(Equals(Value, other.Value)); }