public TrackableContainerSqlMapper(ISqlProvider sqlProvider, Tuple <string, object[]>[] mapperParameters) { _sqlProvider = sqlProvider; _trackableType = TrackableResolver.GetContainerTrackerType(typeof(T)); if (_trackableType == null) { throw new ArgumentException($"Cannot find tracker type of '{nameof(T)}'"); } _items = ConstructPropertyItems(sqlProvider, mapperParameters); }
public TrackableContainerRedisMapper(RedisTypeConverter typeConverter = null) { if (typeConverter == null) { typeConverter = RedisTypeConverter.Instance; } _trackableType = TrackableResolver.GetContainerTrackerType(typeof(T)); if (_trackableType == null) { throw new ArgumentException($"Cannot find tracker type of '{nameof(T)}'"); } _items = ConstructPropertyItems(typeConverter); }
public TrackableContainerHashesRedisMapper(RedisTypeConverter typeConverter = null) { if (typeConverter == null) { typeConverter = RedisTypeConverter.Instance; } _trackableType = TrackableResolver.GetContainerTrackerType(typeof(T)); if (_trackableType == null) { throw new ArgumentException($"Cannot find tracker type of '{nameof(T)}'"); } _items = ConstructPropertyItems(typeConverter); _fieldNameToItemMap = _items.ToDictionary(x => x.FieldName, y => y); }
public TrackableContainerMongoDbMapper() { _trackableType = TrackableResolver.GetContainerTrackerType(typeof(T)); _items = ConstructPropertyItems(); }