internal IObjectReaderFactory GetFactory(Type elementType, Type dataReaderType, object mapping, DataLoadOptions options, SqlExpression projection) { for (LinkedListNode <CacheInfo> info = this.list.First; info != null; info = info.Next) { if (elementType == info.Value.elementType && dataReaderType == info.Value.dataReaderType && mapping == info.Value.mapping && DataLoadOptions.ShapesAreEquivalent(options, info.Value.options) && SqlProjectionComparer.AreSimilar(projection, info.Value.projection) ) { // move matching item to head of list to reset its lifetime this.list.Remove(info); this.list.AddFirst(info); return(info.Value.factory); } } return(null); }