public async Task InsertInboundMessagesAsync(Signature signature, List <InboundMessage> messages, string extendedCode)
        {
            if (signature == null || messages == null || messages.Count <= 0)
            {
                return;
            }

            var table    = this.client.GetTableReference(InboundMessageTableName);
            var entities = messages.Where(m => m.MoMessage != null).Select(m => new InboundMessageTableEntity(signature.EngagementAccount, signature.Value, m, extendedCode)).ToList();
            await InboundMessageTableEntity.InsertOrMergeBatchAsync(table, entities);
        }
 public async Task CleanupMessageAsync(DateTime before)
 {
     var table = this.client.GetTableReference(InboundMessageTableName);
     await InboundMessageTableEntity.CleanupAsync(table, before);
 }
 public async Task DeleteMessagesAsync(string engagementAccount)
 {
     var table = this.client.GetTableReference(InboundMessageTableName);
     await InboundMessageTableEntity.DeleteAsync(table, engagementAccount);
 }
 public async Task DeleteMessagesAsync(List <InboundMessageTableEntity> messages)
 {
     var table = this.client.GetTableReference(InboundMessageTableName);
     await InboundMessageTableEntity.DeleteAsync(table, messages);
 }
        public async Task <List <InboundMessageTableEntity> > GetMessagesAsync(string engagementAccount, DateTime startTime, int count)
        {
            var table = this.client.GetTableReference(InboundMessageTableName);

            return(await InboundMessageTableEntity.ListAsync(table, engagementAccount, startTime, count));
        }