public DataRecordAdapter(IDataConverter dataConverter, IDataReader dataReader, IRecordCache cache, IShuffler shuffler) { _dataConverter = dataConverter; _dataReader = dataReader; _cache = cache; _shuffler = shuffler; }
/// <summary> /// Initializes a new instance of the <see cref="FilebaseDataset{T}"/> class. /// </summary> /// <param name="name">The name of the data set.</param> /// <param name="context">The associated <see cref="FilebaseContext"/> instance.</param> /// <param name="idExtractor">The function that extracts an id from a record.</param> public FilebaseDataset(string name, FilebaseContext context, Func <T, string> idExtractor) { _idExtractor = idExtractor; _localRecords = new LocalRecordCache <IDictionary <string, T> >(); var backingFilePath = Path.Combine(context.RootDirectory.FullName, name + ".json"); FileStorageProvider = new FileStorageProvider <T>(new FileInfo(backingFilePath)); IsVolatile = true; }
public ServiceCache2(IRecordCache recordCache) { _recordCache = recordCache; }