private Collection <T> ReadAll <T>(PSDataCollection <T> psDataCollection) { if (this.flush) { return(psDataCollection.ReadAll()); } T[] array = new T[psDataCollection.Count]; psDataCollection.CopyTo(array, 0); Collection <T> collection = new Collection <T>(); foreach (T local in array) { collection.Add(local); } return(collection); }