/// <summary> /// Returns the RedisKpiValues for the given KpiEnums which have the given ShipId, /// and whose timestamps are between the given startDate and endDate. /// </summary> public List <RedisKpiValue> GetRange(long shipId, List <EKpi> kpiEnums, DateTime startDate, DateTime endDate) { List <string> keys = new List <string>(); for (var currDate = startDate; currDate < endDate; currDate = currDate.AddDays(1)) { foreach (var kpi in kpiEnums) { keys.Add(KpiValueKeyFormatter.GetKey(shipId, kpi, currDate)); } } return(RedisDatabaseApi.Search <RedisKpiValue>(keys)); }
public string ToRedisKey() { return(KpiValueKeyFormatter.GetKey(ShipId, Kpi.KpiEnum, Date)); }