internal CoreEnumerator(OptimizedList <TEntity> list) { this.list = list; version = list.version; index = 0; Current = default(TEntity); }
public bool MoveNext() { OptimizedList <TEntity> localList = list; if (version == localList.version && (index < localList.Count)) { Current = localList.itemsSource[index]; index++; return(true); } return(MoveNextRare()); }
public TEntity[] FindAll(Func <TEntity, bool> match) { if (match == null) { throw new ArgumentNullException("match", "Match item predicate can not be null."); } var list = new OptimizedList <TEntity>(); var item = default(TEntity); for (int i = 0; i < Count; i++) { item = itemsSource[i]; if (match(item)) { list.Add(item); } } return(list.ToArray()); }
internal SynchronizedList(OptimizedList <TEntity> list) { this.list = list; root = list.SyncRoot; }