Exemplo n.º 1
0
        protected BotSubscription CreateBotSubscription(BotSubscriptionEntity entity)
        {
            LastActivity activity;

            if (entity.LastActivityDate == null)
            {
                activity = null;
            }
            else
            {
                activity = new LastActivity()
                {
                    ActitityId     = entity.ActitityId,
                    ConversationId = entity.ConversationId,
                    Created        = entity.LastActivityDate.Value,
                };
            }

            return(new BotSubscription()
            {
                ChannelId = entity.ChannelId,
                GroupName = entity.GroupName,
                ServiceUrl = entity.ServiceUrl,
                TeamId = entity.TeamId,
                TenantId = entity.TeamId,
                LastActivity = activity
            });
        }
Exemplo n.º 2
0
 public async Task UpdateSubscription(BotSubscriptionEntity device)
 {
     var operation = TableOperation.InsertOrReplace(device);
     await subscriptionsTable.ExecuteAsync(operation);
 }
Exemplo n.º 3
0
 public async Task RegisterSubscription(BotSubscriptionEntity device)
 {
     var operation = TableOperation.Insert(device);
     await subscriptionsTable.ExecuteAsync(operation);
 }