public int Compare(bool leftExists, ReadOnlySpan <byte> left, bool rightExists, ReadOnlySpan <byte> right) { short leftValue = leftExists ? ScalarSpanReader.ReadShort(left) : this.defaultValue; short rightValue = rightExists ? ScalarSpanReader.ReadShort(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.ReadShort(left).CompareTo(ScalarSpanReader.ReadShort(right))); }
public override short ReadShort(int offset) { CheckAlignment(offset, sizeof(short)); return(ScalarSpanReader.ReadShort(this.memory.AsSpan().Slice(offset))); }
public int Compare(ReadOnlySpan <byte> left, ReadOnlySpan <byte> right) => ScalarSpanReader.ReadShort(left).CompareTo(ScalarSpanReader.ReadShort(right));
public override short ReadShort(int offset) { return(ScalarSpanReader.ReadShort(this.memory.AsSpan().Slice(offset))); }