コード例 #1
0
 private static bool InsertEntityToTable(string rowKey, string body, CloudTable table)
 {
     return(AzureStorageHelper.InsertAsync <RoutingDataEntity>(table,
                                                               new RoutingDataEntity()
     {
         Body = body, PartitionKey = DefaultPartitionKey, RowKey = rowKey
     }).Result);
 }
コード例 #2
0
 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);
 }
コード例 #3
0
 protected override bool ExecuteAddPendingRequest(Party requestorParty)
 {
     return(AzureStorageHelper.InsertAsync <PartyEntity>(
                _pendingRequestsTable, new PartyEntity(requestorParty, PartyEntityType.PendingRequest)).Result);
 }
コード例 #4
0
 protected override bool ExecuteAddAggregationParty(Party aggregationPartyToAdd)
 {
     return(AzureStorageHelper.InsertAsync <PartyEntity>(
                _aggregationPartiesTable, new PartyEntity(aggregationPartyToAdd, PartyEntityType.Aggregation)).Result);
 }
コード例 #5
0
 protected override bool ExecuteAddParty(Party partyToAdd, bool isUser)
 {
     return(AzureStorageHelper.InsertAsync <PartyEntity>(
                isUser ? _userPartiesTable : _botPartiesTable,
                new PartyEntity(partyToAdd, isUser ? PartyEntityType.User : PartyEntityType.Bot)).Result);
 }