private static bool InsertEntityToTable(string rowKey, string body, CloudTable table) { return(AzureStorageHelper.InsertAsync <RoutingDataEntity>(table, new RoutingDataEntity() { Body = body, PartitionKey = DefaultPartitionKey, RowKey = rowKey }).Result); }
protected override bool ExecuteAddConnection(Party conversationOwnerParty, Party conversationClientParty) { return(AzureStorageHelper.InsertAsync <ConnectionEntity>(_connectionsTable, new ConnectionEntity() { PartitionKey = conversationClientParty.ConversationAccount.Id, RowKey = conversationOwnerParty.ConversationAccount.Id, Client = JsonConvert.SerializeObject(new PartyEntity(conversationClientParty, PartyEntityType.Client)), Owner = JsonConvert.SerializeObject(new PartyEntity(conversationOwnerParty, PartyEntityType.Owner)) }).Result); }
protected override bool ExecuteAddPendingRequest(Party requestorParty) { return(AzureStorageHelper.InsertAsync <PartyEntity>( _pendingRequestsTable, new PartyEntity(requestorParty, PartyEntityType.PendingRequest)).Result); }
protected override bool ExecuteAddAggregationParty(Party aggregationPartyToAdd) { return(AzureStorageHelper.InsertAsync <PartyEntity>( _aggregationPartiesTable, new PartyEntity(aggregationPartyToAdd, PartyEntityType.Aggregation)).Result); }
protected override bool ExecuteAddParty(Party partyToAdd, bool isUser) { return(AzureStorageHelper.InsertAsync <PartyEntity>( isUser ? _userPartiesTable : _botPartiesTable, new PartyEntity(partyToAdd, isUser ? PartyEntityType.User : PartyEntityType.Bot)).Result); }