public async Task ProcessAllAsync(Func <ITransferContract, Task> processAction)
 {
     await _table.GetDataByChunksAsync(TransferContractEntity.GenerateParitionKey(), async (items) =>
     {
         foreach (var item in items)
         {
             await processAction(item);
         }
     });
 }
        public async Task SaveAsync(ITransferContract transferContract)
        {
            var entity = TransferContractEntity.Create(transferContract);

            await _table.InsertOrReplaceAsync(entity);

            if (!string.IsNullOrEmpty(entity.UserAddress))
            {
                var index = new AzureIndex(_indexPartition,
                                           GenerateUserAdapterRowKey(entity.UserAddress, entity.CoinAdapterAddress), entity);

                await _userAdapterIndex.InsertOrReplaceAsync(index);
            }
        }
        public async Task <ITransferContract> GetAsync(string contractAddress)
        {
            ITransferContract result = await _table.GetDataAsync(TransferContractEntity.GenerateParitionKey(), contractAddress);

            return(result);
        }
        public async Task <(IEnumerable <ITransferContract>, string)> GetByTokenAsync(int take, string continuationToken)
        {
            var(collection, token) = await _table.GetDataWithContinuationTokenAsync(TransferContractEntity.GenerateParitionKey(), take, continuationToken);

            return(collection, token);
        }