网上演练
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
807 B

#if !NET_4_6
using System;
using System.Collections.Generic;
namespace LinqInternal.Collections.ThreadSafe
{
internal interface IBucket<T> : IEnumerable<T>
{
int Count { get; }
void CopyTo(T[] array, int arrayIndex);
bool Exchange(int index, T item, out T previous);
bool Insert(int index, T item);
bool Insert(int index, T item, out T previous);
bool RemoveAt(int index);
bool RemoveAt(int index, out T previous);
bool RemoveAt(int index, Predicate<T> check);
void Set(int index, T item, out bool isNew);
bool TryGet(int index, out T value);
bool Update(int index, Func<T, T> itemUpdateFactory, Predicate<T> check, out bool isEmpty);
IEnumerable<T> Where(Predicate<T> check);
}
}
#endif