예제 #1
0
        public async Task Dump(IEnumerable <MarginTradingAccount> accounts)
        {
            var reportTime = _dateService.Now();
            var entities   = accounts.Select(x => AccountStatEntity.Create(x, reportTime));

            await _tableStorage.DeleteAsync();

            await _tableStorage.CreateTableIfNotExistsAsync();

            await _tableStorage.InsertAsync(entities);
        }
예제 #2
0
        public async Task Dump(IEnumerable <Position> openPositions)
        {
            var reportTime = _dateService.Now();
            var entities   = openPositions.Select(x => OpenPositionEntity.Create(x, reportTime));

            await _tableStorage.DeleteAsync();

            await _tableStorage.CreateTableIfNotExistsAsync();

            await _tableStorage.InsertAsync(entities);
        }
 public Task CreateTableIfNotExistsAsync()
 {
     return(_storage.CreateTableIfNotExistsAsync());
 }
예제 #4
0
 public Task CreateTableIfNotExistsAsync()
 {
     return(_impl.CreateTableIfNotExistsAsync());
 }