示例#1
0
 public static unsafe void Remove <TElement>(this IRemove <TElement> collection, TElement *elements, Int32 length) where TElement : unmanaged
 {
     for (Int32 i = 0; i < length; i++)
     {
         collection.Remove(elements[i]);
     }
 }
示例#2
0
 /// <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, ReadOnlySpan <TElement> elements)
 {
     for (Int32 i = 0; i < elements.Length; i++)
     {
         collection.Remove(elements[i]);
     }
 }
示例#3
0
        public static void RemoveItems(IRemove removeCollection, int n)
        {
            for (int i = 0; i < n; i++)
            {
                Console.Write(removeCollection.Remove() + " ");
            }

            Console.WriteLine();
        }
示例#4
0
 /// <summary>
 /// Removes all instances of the elements from this object.
 /// </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 remove.</param>
 public static void Remove <TElement, TEnumerator>(this IRemove <TElement> collection, IGetEnumerator <TElement, TEnumerator>?elements) where TEnumerator : notnull, ICurrent <TElement>, IMoveNext
 {
     if (elements is not null)
     {
         foreach (TElement element in elements)
         {
             collection.Remove(element);
         }
     }
 }
示例#5
0
 /// <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, Collections.Generic.IEnumerable <TElement>?elements)
 {
     if (elements is not null)
     {
         foreach (TElement element in elements)
         {
             collection.Remove(element);
         }
     }
 }
示例#6
0
文件: Main.cs 项目: metaseed/Metakey
 public override void OnUnloading()
 {
     token.Remove();
     base.OnUnloading();
 }
示例#7
0
 public int Remove(string id)
 {
     return(_removeOperations.Remove(id));
 }