public async Task RegisterEventAsync(IRawLogEvent evnt, string clientId = null) { var newEntity = RawLogEventEntity.Create(evnt); await _tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(newEntity, evnt.DateTime); if (!string.IsNullOrWhiteSpace(clientId)) { var byCLient = RawLogEventEntity.CreateByClient(evnt, clientId); await _tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(byCLient, evnt.DateTime); } }
public async Task AddAsync(IAccountBalanceChange change) { var entity = _convertService.Convert <AccountBalanceChangeEntity>(change); // ReSharper disable once RedundantArgumentDefaultValue await _tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(entity, entity.ChangeTimestamp, RowKeyDateTimeFormat.Iso); }
public Task AddAsync(IOrderHistory order) { var entity = MarginTradingOrderHistoryEntity.Create(order); // ReSharper disable once RedundantArgumentDefaultValue return(_tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(entity, entity.CloseDate ?? entity.OpenDate ?? entity.CreateDate, RowKeyDateTimeFormat.Iso)); }
public Task AddAsync(string withdrawalId, string message, string techData) { var now = DateTime.UtcNow; return(_tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync( WithdrawalLogEntity.Create(withdrawalId, message, techData, now), now)); }
public async Task <IGlobalCheckInfo> AddOrUpdateAsync(IGlobalCheckInfo entity) { var newEntity = GlobalCheckInfoEntity.Create(entity); await _tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(newEntity, newEntity.StartDateTime); return(newEntity); }
public async Task AddAsync(IMarginTradingAccountHistory accountHistory) { var entity = MarginTradingAccountHistoryEntity.Create(accountHistory); entity.EntityVersion = 2; // ReSharper disable once RedundantArgumentDefaultValue await _tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(entity, entity.Date, RowKeyDateTimeFormat.Iso); }
public Task AddAsync(IOrderHistory order, ITrade trade) { var entity = OrderHistoryEntity.Create(order); // ReSharper disable once RedundantArgumentDefaultValue //TODO: use event datetime return(_tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(entity, DateTime.UtcNow, RowKeyDateTimeFormat.Iso)); }
private async Task <CashOutBaseEntity> ChangeStatus(string clientId, string requestId, CashOutRequestStatus status) { var entity = await _tableStorage.DeleteAsync(clientId, requestId); entity.PartitionKey = "Processed"; entity.Status = status; return(await _tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(entity, entity.DateTime)); }
private async Task <ICashOutRequest> ChangeStatus(string clientId, string requestId, CashOutRequestStatus status) { var entity = await _tableStorage.DeleteAsync(CashOutAttemptEntity.PendingRecords.GeneratePartition(clientId), CashOutAttemptEntity.PendingRecords.GenerateRowKey(requestId)); entity.PartitionKey = CashOutAttemptEntity.HistoryRecords.GeneratePartition(); entity.Status = status; return(await _tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(entity, entity.DateTime)); }
public async Task <ITransferEvent> RegisterAsync(ITransferEvent src) { var newEntity = TransferEventEntity.ByClientId.Create(src); var inserted = await _tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(newEntity, newEntity.DateTime, RowKeyDateTimeFormat.Short); var byMultisigEntity = TransferEventEntity.ByMultisig.Create(src, inserted.RowKey); await _tableStorage.InsertAsync(byMultisigEntity); return(newEntity); }
public async Task InsertAsync(IPaymentTransaction paymentTransaction) { var commonEntity = Mapper.Map <PaymentTransactionEntity>(paymentTransaction); commonEntity.PartitionKey = PaymentTransactionEntity.GeneratePartitionKey(); await _tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(commonEntity, paymentTransaction.Created); var entityByClient = Mapper.Map <PaymentTransactionEntity>(paymentTransaction); entityByClient.PartitionKey = PaymentTransactionEntity.GeneratePartitionKey(paymentTransaction.ClientId); entityByClient.RowKey = PaymentTransactionEntity.GenerateRowKey(paymentTransaction.Id); var index = AzureMultiIndex.Create(IndexPartitionKey, paymentTransaction.Id, commonEntity, entityByClient); await Task.WhenAll( _tableStorage.InsertAsync(entityByClient), _tableStorageIndices.InsertAsync(index) ); }
public async Task CreateAsync(IPaymentTransaction src) { var commonEntity = PaymentTransactionEntity.Create(src); commonEntity.PartitionKey = PaymentTransactionEntity.IndexCommon.GeneratePartitionKey(); await _tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(commonEntity, src.Created); var entityByClient = PaymentTransactionEntity.Create(src); entityByClient.PartitionKey = PaymentTransactionEntity.IndexByClient.GeneratePartitionKey(src.ClientId); entityByClient.RowKey = PaymentTransactionEntity.IndexByClient.GenerateRowKey(src.Id); var index = AzureMultiIndex.Create(IndexPartitinKey, src.Id, commonEntity, entityByClient); await Task.WhenAll( _tableStorage.InsertAsync(entityByClient), _tableStorageIndices.InsertAsync(index) ); }
public Task WriteAsync(string clientId, string url, string request, string response, string userAgent) { var newEntity = RequestsLogRecord.Create(clientId, url, request, response, userAgent); return(_tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(newEntity, newEntity.DateTime)); }
public Task AddRecordAsync(IAuthorizationLogRecord record) { var newEntity = AuthorizationLogRecordEntity.Create(record); return(_tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(newEntity, record.DateTime)); }
public Task WriteAsync(string userId, string dataId) { var newEntity = ClientLogItem.Create(userId, dataId); return(_tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(newEntity, DateTime.UtcNow)); }
public async Task AddAsync(IOvernightSwapHistory obj) { var entity = OvernightSwapHistoryEntity.Create(obj); await _tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(entity, entity.Time); }
public Task InsertAsync(OrderbookBestPricesHistoryEntity entity, DateTime time) { return(_tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(entity, time)); }
public async Task InsertHistoryRecord(IWalletCredentials oldWalletCredentials) { var entity = WalletCredentialsHistoryRecord.Create(oldWalletCredentials); await _tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(entity, DateTime.UtcNow); }
public async Task InsertAsync(IPaymentTransactionEventLog newEvent) { var newEntity = Mapper.Map <PaymentTransactionEventLogEntity>(newEvent); await _tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(newEntity, newEntity.DateTime); }
public async Task RegisterIgnoredAsync(DateTime dateTime, ILkk2YOrder order) { var newEntity = Lkk2YOrderEntity.CreateIgnored(order); await _tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(newEntity, dateTime); }
public Task AddAsync(IKycUploadsLogItem itm) { var newEntity = KycUploadsLogItemEntity.Create(itm); return(_tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(newEntity, newEntity.DateTime)); }
public async Task <IRegistrationLogEvent> RegisterEventAsync(IRegistrationLogEvent evnt) { var newEntity = RegistrationLogEventEntity.Create(evnt); return(await _tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(newEntity, evnt.DateTime)); }
public Task WriteEvent(string clientId, Event eventType, string data) { var entity = EthClientEventRecord.Create(clientId, eventType, data); return(_tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(entity, DateTime.UtcNow)); }
public async Task WriteAsync(IPaymentTransactionLogEvent newEvent) { var newEntity = PaymentTransactionLogEventEntity.Create(newEvent); await _tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(newEntity, newEntity.DateTime); }
public async Task InsertAsync(ILogItem olapEntity) { await _storage.InsertAndGenerateRowKeyAsDateTimeAsync(LogEntity.CreateEntity(olapEntity), DateTime.UtcNow); }
public Task InsertRecordAsync(string method, string clientId) { var entity = ApiCallHistoryRecord.Create(method, clientId); return(_tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(entity, entity.DateTime)); }
public Task CreateAsync(IMarginTradingPaymentLog record) { var newEntity = MarginTradingPaymentLogEntity.Create(record); return(_tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(newEntity, newEntity.DateTime)); }