public int Compare(bool leftExists, ReadOnlySpan <byte> left, bool rightExists, ReadOnlySpan <byte> right) { bool leftValue = leftExists ? ScalarSpanReader.ReadBool(left) : this.defaultValue; bool rightValue = rightExists ? ScalarSpanReader.ReadBool(right) : this.defaultValue; return(leftValue.CompareTo(rightValue)); }
public int Compare(bool leftExists, ReadOnlySpan <byte> left, bool rightExists, ReadOnlySpan <byte> right) { if (!leftExists || !rightExists) { return(leftExists.CompareTo(rightExists)); } return(ScalarSpanReader.ReadBool(left).CompareTo(ScalarSpanReader.ReadBool(right))); }
public int Compare(ReadOnlySpan <byte> left, ReadOnlySpan <byte> right) => ScalarSpanReader.ReadBool(left).CompareTo(ScalarSpanReader.ReadBool(right));