public static void Validate <T>(this ReadOnlyMemory <T> memory, params T[] expected) where T : IEquatable <T> { Assert.True(memory.Span.SequenceEqual(expected)); }
/// <summary> /// Removes all instances of the elements from this object. /// </summary> /// <typeparam name="TElement">The type of the elements in the collection.</typeparam> /// <param name="collection">This collection.</param> /// <param name="elements">The elements to remove.</param> public static void Remove <TElement>(this IRemove <TElement> collection, ReadOnlyMemory <TElement> elements) => Remove(collection, elements.Span);