Exemplo n.º 1
0
        public static OutputEntity CreateNew(IOutput output)
        {
            var result = new OutputEntity
            {
                Time         = output.Time,
                Txid         = output.Txid,
                Value        = output.Value,
                RowKey       = GenerateRowKey(output.Addresses),
                PartitionKey = GeneratePartiteonKey(output.BlockHash)
            };

            return(result);
        }
Exemplo n.º 2
0
        public async Task <IEnumerable <IOutput> > GetAsync(string hashBlock)
        {
            var partitionKey = OutputEntity.GeneratePartiteonKey(hashBlock);

            return(await _tableStorage.GetDataAsync(partitionKey));
        }
Exemplo n.º 3
0
        public Task SaveAsync(IOutput output)
        {
            var newOutputs = OutputEntity.CreateNew(output);

            return(_tableStorage.InsertOrReplaceAsync(newOutputs));
        }