Beispiel #1
0
        public async Task CleanAsync()
        {
            Func <IEnumerable <IAddressNonce>, Task> func = async(items) =>
            {
                foreach (var item in items)
                {
                    await _table.DeleteIfExistAsync(AddressNonceEntity.GetPartitionKey(), item.Address);
                }
            };

            await _table.GetDataByChunksAsync(func);
        }
Beispiel #2
0
        public async Task <IAddressNonce> GetAsync(string address)
        {
            var entity = await _table.GetDataAsync(AddressNonceEntity.GetPartitionKey(), address);

            return(entity);
        }
Beispiel #3
0
        public async Task SaveAsync(IAddressNonce nonce)
        {
            var entity = AddressNonceEntity.CreateEntity(nonce);

            await _table.InsertOrReplaceAsync(entity);
        }