Пример #1
0
        public StatusModel(EmailRequest email, EmailAction action, EmailFanoutStatus status)
        {
            Status     = status.ToString();
            ActionId   = action.Id;
            ReceivedAt = email.Timestamp;

            PartitionKey = GetPartitionKey(email);
            RowKey       = GetRowKey(email, action);
        }
Пример #2
0
        public async Task <StatusModel> UpdateAsync(EmailRequest request, EmailAction action, EmailFanoutStatus status, CancellationToken cancellationToken)
        {
            await _table.CreateIfNotExistsAsync(null, null, cancellationToken);

            var model = new StatusModel(request, action, status);
            await _table.ExecuteAsync(TableOperation.InsertOrReplace(model), null, null, cancellationToken);

            return(model);
        }