Exemplo n.º 1
0
        public async Task <double[]> GetAsync(string assetPairId)
        {
            var entity = await _tableStorage.GetDataAsync(FeedHoursHistoryEntity.GeneratePartition(),
                                                          FeedHoursHistoryEntity.GenerateRowKey(assetPairId));

            return(GetData(entity));
        }
Exemplo n.º 2
0
 private static double[] GetData(FeedHoursHistoryEntity entity)
 {
     return(entity?.Data?.Split(';').Select(x => double.Parse(x, CultureInfo.InvariantCulture)).ToArray() ?? Array.Empty <double>());
 }
Exemplo n.º 3
0
        public async Task <Dictionary <string, double[]> > GetAllAsync()
        {
            var entities = await _tableStorage.GetDataAsync(FeedHoursHistoryEntity.GeneratePartition());

            return(entities.ToDictionary(entity => entity.RowKey, GetData));
        }