Beispiel #1
0
        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));
        }
Beispiel #2
0
        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)));
        }
Beispiel #3
0
 public int Compare(ReadOnlySpan <byte> left, ReadOnlySpan <byte> right)
 => ScalarSpanReader.ReadBool(left).CompareTo(ScalarSpanReader.ReadBool(right));