Example #1
0
 /// <inheritdoc/>
 public override bool Equals(ReadOnlyMemory <byte> x, ReadOnlyMemory <byte> y) => BufferComparer.CompareMemory(x, y) == 0;
Example #2
0
 /// <inheritdoc/>
 public override bool Equals(byte[] x, byte[] y) => BufferComparer.CompareArray(x, y) == 0;
Example #3
0
 /// <summary>
 /// Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
 /// </summary>
 /// <param name="x">The first object to compare.</param>
 /// <param name="y">The second object to compare.</param>
 /// <returns>
 /// A signed integer that indicates the relative values of <paramref name="x" /> and <paramref name="y" />, as shown in the following table.Value Meaning Less than zero<paramref name="x" /> is less than <paramref name="y" />.Zero<paramref name="x" /> equals <paramref name="y" />.Greater than zero<paramref name="x" /> is greater than <paramref name="y" />.
 /// </returns>
 public override int Compare(ReadOnlyMemory <byte> x, ReadOnlyMemory <byte> y) => BufferComparer.CompareMemory(x, y);
Example #4
0
 /// <summary>
 /// Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
 /// </summary>
 /// <param name="x">The first object to compare.</param>
 /// <param name="y">The second object to compare.</param>
 /// <returns>
 /// A signed integer that indicates the relative values of <paramref name="x" /> and <paramref name="y" />, as shown in the following table.Value Meaning Less than zero<paramref name="x" /> is less than <paramref name="y" />.Zero<paramref name="x" /> equals <paramref name="y" />.Greater than zero<paramref name="x" /> is greater than <paramref name="y" />.
 /// </returns>
 public override int Compare(byte[] x, byte[] y) => BufferComparer.CompareArray(x, y);