Exemple #1
0
 public static unsafe void Postpend <TElement>(this IPostpend <TElement> collection, TElement *elements, Int32 length) where TElement : unmanaged
 {
     for (Int32 i = 0; i < length; i++)
     {
         collection.Postpend(elements[i]);
     }
 }
Exemple #2
0
 /// <summary>
 /// Postpends the elements onto this object, one by one.
 /// </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 postpend.</param>
 public static void Postpend <TElement>(this IPostpend <TElement> collection, ReadOnlySpan <TElement> elements)
 {
     for (Int32 i = 0; i < elements.Length; i++)
     {
         collection.Postpend(elements[i]);
     }
 }
Exemple #3
0
 /// <summary>
 /// Postpends the elements onto this object, one by one.
 /// </summary>
 /// <typeparam name="TElement">The type of the elements in the collection.</typeparam>
 /// <typeparam name="TEnumerator">The type of the enumerator for the <paramref name="elements"/>.</typeparam>
 /// <param name="collection">This collection.</param>
 /// <param name="elements">The elements to postpend.</param>
 public static void Postpend <TElement, TEnumerator>(this IPostpend <TElement> collection, IGetEnumerator <TElement, TEnumerator> elements) where TEnumerator : notnull, ICurrent <TElement>, IMoveNext
 {
     if (elements is not null)
     {
         foreach (TElement element in elements)
         {
             collection.Postpend(element);
         }
     }
 }
Exemple #4
0
 /// <summary>
 /// Postpends the elements onto this object, one by one.
 /// </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 postpend.</param>
 public static void Postpend <TElement>(this IPostpend <TElement> collection, Collections.Generic.IEnumerable <TElement> elements)
 {
     if (elements is not null)
     {
         foreach (TElement element in elements)
         {
             collection.Postpend(element);
         }
     }
 }
Exemple #5
0
 /// <summary>
 /// Postpends the elements onto this object, one by one.
 /// </summary>
 /// <param name="collection">This collection.</param>
 /// <param name="elements">The elements to postpend.</param>
 public static void Postpend(this IPostpend <Char> collection, String elements) => Postpend(collection, elements.AsSpan());
Exemple #6
0
 /// <summary>
 /// Postpends the elements onto this object, one by one.
 /// </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 postpend.</param>
 public static void Postpend <TElement>(this IPostpend <TElement> collection, Span <TElement> elements) => Postpend(collection, (ReadOnlySpan <TElement>)elements);
Exemple #7
0
 /// <summary>
 /// Postpends the elements onto this object, one by one.
 /// </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 postpend.</param>
 public static void Postpend <TElement>(this IPostpend <TElement> collection, ReadOnlyMemory <TElement> elements) => Postpend(collection, elements.Span);
Exemple #8
0
 /// <summary>
 /// Postpends the elements onto this object, one by one.
 /// </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 postpend.</param>
 public static void Postpend <TElement>(this IPostpend <TElement> collection, ArraySegment <TElement> elements) => Postpend(collection, elements.AsSpan());
Exemple #9
0
 /// <summary>
 /// Postpends the elements onto this object, one by one.
 /// </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 postpend.</param>
 public static void Postpend <TElement>(this IPostpend <TElement> collection, params TElement[] elements) => Postpend(collection, elements.AsSpan());