Ejemplo n.º 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));
        }
Ejemplo n.º 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)));
        }
Ejemplo n.º 3
0
 public int Compare(ReadOnlySpan <byte> left, ReadOnlySpan <byte> right)
 => ScalarSpanReader.ReadBool(left).CompareTo(ScalarSpanReader.ReadBool(right));