Skip to content

Commit bffbb91

Browse files
authored
Merge pull request #6 from tompaana/development
The second pre-release snapshot
2 parents 892d64d + a062795 commit bffbb91

13 files changed

+238
-307
lines changed

BotMessageRouting/BotMessageRouting.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@
7070
<Reference Include="Microsoft.WindowsAzure.Configuration, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7171
<HintPath>$(SolutionDir)\packages\Microsoft.WindowsAzure.ConfigurationManager.3.2.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll</HintPath>
7272
</Reference>
73-
<Reference Include="Microsoft.WindowsAzure.Storage, Version=8.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
74-
<HintPath>$(SolutionDir)\packages\WindowsAzure.Storage.8.3.0\lib\net45\Microsoft.WindowsAzure.Storage.dll</HintPath>
73+
<Reference Include="Microsoft.WindowsAzure.Storage, Version=8.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
74+
<HintPath>$(SolutionDir)\packages\WindowsAzure.Storage.8.4.0\lib\net45\Microsoft.WindowsAzure.Storage.dll</HintPath>
7575
</Reference>
7676
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
7777
<HintPath>$(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
@@ -108,7 +108,7 @@
108108
<Compile Include="MessageRouting\IMessageRouterResultHandler.cs" />
109109
<Compile Include="MessageRouting\MessageRouterManager.cs" />
110110
<Compile Include="MessageRouting\MessageRouterResult.cs" />
111-
<Compile Include="Models\EngageableParty.cs" />
111+
<Compile Include="Models\PartyWithTimestamps.cs" />
112112
<Compile Include="Utils\MessagingUtils.cs" />
113113
<Compile Include="Models\Party.cs" />
114114
<Compile Include="Properties\AssemblyInfo.cs" />

BotMessageRouting/BotMessageRouting.nuspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
<package >
33
<metadata>
44
<id>Underscore.Bot.MessageRouting</id>
5-
<version>0.9.0.0</version>
5+
<version>0.9.2.0</version>
66
<title>Bot Message Routing component</title>
7-
<authors>See README on project website</authors>
7+
<authors>Tomi Paananen et al. (see README on project website)</authors>
88
<owners>Tomi Paananen</owners>
99
<licenseUrl>https://github.com/tompaana/bot-message-routing/blob/master/LICENSE</licenseUrl>
1010
<projectUrl>https://github.com/tompaana/bot-message-routing</projectUrl>
1111
<!-- <iconUrl>http://ICON_URL_HERE_OR_DELETE_THIS_LINE</iconUrl> -->
1212
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1313
<description>Message routing component for chatbots built with Microsoft Bot Framework C# SDK</description>
14-
<releaseNotes>This is the first release.</releaseNotes>
14+
<releaseNotes>This is the second pre-release.</releaseNotes>
1515
<copyright>Copyright 2017 Microsoft</copyright>
1616
<tags>chatbot chatbots bot bots messaging message routing</tags>
1717
</metadata>

BotMessageRouting/MessageRouting/DataStore/AzureTableStorageRoutingDataManager.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public bool AddAggregationParty(Party party)
3636
throw new NotImplementedException();
3737
}
3838

39-
public MessageRouterResult AddEngagementAndClearPendingRequest(Party conversationOwnerParty, Party conversationClientParty)
39+
public MessageRouterResult ConnectAndClearPendingRequest(Party conversationOwnerParty, Party conversationClientParty)
4040
{
4141
throw new NotImplementedException();
4242
}
@@ -61,7 +61,7 @@ public void DeleteAll()
6161
throw new NotImplementedException();
6262
}
6363

64-
public string EngagementsAsString()
64+
public string ConnectionsToString()
6565
{
6666
throw new NotImplementedException();
6767
}
@@ -71,7 +71,7 @@ public Party FindBotPartyByChannelAndConversation(string channelId, Conversation
7171
throw new NotImplementedException();
7272
}
7373

74-
public Party FindEngagedPartyByChannel(string channelId, ChannelAccount channelAccount)
74+
public Party FindConnectedPartyByChannel(string channelId, ChannelAccount channelAccount)
7575
{
7676
throw new NotImplementedException();
7777
}
@@ -101,7 +101,7 @@ public IList<Party> GetBotParties()
101101
throw new NotImplementedException();
102102
}
103103

104-
public Party GetEngagedCounterpart(Party partyWhoseCounterpartToFind)
104+
public Party GetConnectedCounterpart(Party partyWhoseCounterpartToFind)
105105
{
106106
throw new NotImplementedException();
107107
}
@@ -121,7 +121,7 @@ public bool IsAssociatedWithAggregation(Party party)
121121
throw new NotImplementedException();
122122
}
123123

124-
public bool IsEngaged(Party party, EngagementProfile engagementProfile)
124+
public bool IsConnected(Party party, ConnectionProfile connectionProfile)
125125
{
126126
throw new NotImplementedException();
127127
}
@@ -131,7 +131,7 @@ public bool RemoveAggregationParty(Party party)
131131
throw new NotImplementedException();
132132
}
133133

134-
public IList<MessageRouterResult> RemoveEngagement(Party party, EngagementProfile engagementProfile)
134+
public IList<MessageRouterResult> Disconnect(Party party, ConnectionProfile connectionProfile)
135135
{
136136
throw new NotImplementedException();
137137
}

BotMessageRouting/MessageRouting/DataStore/IRoutingDataManager.cs

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
using Microsoft.Bot.Connector;
2-
using System;
32
using System.Collections.Generic;
43
using Underscore.Bot.Models;
54

65
namespace Underscore.Bot.MessageRouting.DataStore
76
{
87
/// <summary>
9-
/// Defines the type of engagement:
10-
/// - None: No engagement
8+
/// Defines the type of the connection:
9+
/// - None: No connection
1110
/// - Client: E.g. a customer
1211
/// - Owner: E.g. a customer service agent
1312
/// - Any: Either a client or an owner
1413
/// </summary>
15-
public enum EngagementProfile
14+
public enum ConnectionProfile
1615
{
1716
None,
1817
Client,
@@ -37,7 +36,7 @@ public interface IRoutingDataManager
3736
/// </summary>
3837
/// <param name="newParty">The new party to add.</param>
3938
/// <param name="isUser">If true, will try to add the party to the list of users.
40-
/// If false, will try to add it to the list of bot identities.</param>
39+
/// If false, will try to add it to the list of bot identities. True by default.</param>
4140
/// <returns>True, if the given party was added. False otherwise (was null or already stored).</returns>
4241
bool AddParty(Party newParty, bool isUser = true);
4342

@@ -98,38 +97,38 @@ bool AddParty(string serviceUrl, string channelId,
9897
bool RemovePendingRequest(Party party);
9998

10099
/// <summary>
101-
/// Checks if the given party is engaged in a 1:1 conversation as defined by the engagement
102-
/// profile (e.g. as a customer, as an agent or either one).
100+
/// Checks if the given party is connected in a 1:1 conversation as defined by
101+
/// the connection profile (e.g. as a customer, as an agent or either one).
103102
/// </summary>
104103
/// <param name="party">The party to check.</param>
105-
/// <param name="engagementProfile">Defines whether to look for clients, owners or both.</param>
106-
/// <returns>True, if the party is engaged as defined by the given engagement profile.
104+
/// <param name="connectionProfile">Defines whether to look for clients, owners or both.</param>
105+
/// <returns>True, if the party is connected as defined by the given connection profile.
107106
/// False otherwise.</returns>
108-
bool IsEngaged(Party party, EngagementProfile engagementProfile);
107+
bool IsConnected(Party party, ConnectionProfile connectionProfile);
109108

110109
/// <summary>
111110
/// Resolves the given party's counterpart in a 1:1 conversation.
112111
/// </summary>
113112
/// <param name="partyWhoseCounterpartToFind">The party whose counterpart to resolve.</param>
114113
/// <returns>The counterpart or null, if not found.</returns>
115-
Party GetEngagedCounterpart(Party partyWhoseCounterpartToFind);
114+
Party GetConnectedCounterpart(Party partyWhoseCounterpartToFind);
116115

117116
/// <summary>
118-
/// Creates a new engagement between the given parties. The method also clears the pending
117+
/// Creates a new connection between the given parties. The method also clears the pending
119118
/// request of the client party, if one exists.
120119
/// </summary>
121120
/// <param name="conversationOwnerParty">The conversation owner party.</param>
122121
/// <param name="conversationClientParty">The conversation client (customer) party.</param>
123-
/// <returns>The result of the operation. The expected result type, when successful, is EngagementAdded.</returns>
124-
MessageRouterResult AddEngagementAndClearPendingRequest(Party conversationOwnerParty, Party conversationClientParty);
122+
/// <returns>The result of the operation. The expected result type, when successful, is Connected.</returns>
123+
MessageRouterResult ConnectAndClearPendingRequest(Party conversationOwnerParty, Party conversationClientParty);
125124

126125
/// <summary>
127-
/// Removes an engagement(s) of the given party i.e. ends the 1:1 conversations.
126+
/// Removes connection(s) of the given party i.e. ends the 1:1 conversations.
128127
/// </summary>
129-
/// <param name="party">The party whose engagements to remove.</param>
130-
/// <param name="engagementProfile">The engagement profile of the party (owner/client/either).</param>
131-
/// <returns>A list of operation results. The expected result types, when successful, are EngagementRemoved.</returns>
132-
IList<MessageRouterResult> RemoveEngagement(Party party, EngagementProfile engagementProfile);
128+
/// <param name="party">The party whose connections to remove.</param>
129+
/// <param name="connectionProfile">The connection profile of the party (owner/client/either).</param>
130+
/// <returns>A list of operation results. The expected result types, when successful, are Disconnected.</returns>
131+
IList<MessageRouterResult> Disconnect(Party party, ConnectionProfile connectionProfile);
133132

134133
/// <summary>
135134
/// Deletes all existing routing data permanently.
@@ -180,12 +179,12 @@ bool AddParty(string serviceUrl, string channelId,
180179
Party FindBotPartyByChannelAndConversation(string channelId, ConversationAccount conversationAccount);
181180

182181
/// <summary>
183-
/// Tries to find a party engaged in a conversation.
182+
/// Tries to find a party connected in a conversation.
184183
/// </summary>
185184
/// <param name="channelId">The channel ID.</param>
186185
/// <param name="channelAccount">The channel account.</param>
187186
/// <returns>The party matching the given details or null if not found.</returns>
188-
Party FindEngagedPartyByChannel(string channelId, ChannelAccount channelAccount);
187+
Party FindConnectedPartyByChannel(string channelId, ChannelAccount channelAccount);
189188

190189
/// <summary>
191190
/// Finds the parties from the given list that match the channel account (and ID) of the given party.
@@ -198,9 +197,9 @@ bool AddParty(string serviceUrl, string channelId,
198197

199198
#region Methods for debugging
200199
#if DEBUG
201-
/// <returns>The engagements (parties in conversation) as a string.
202-
/// Will return an empty string, if no engagements exist.</returns>
203-
string EngagementsAsString();
200+
/// <returns>The connections (parties in conversation) as a string.
201+
/// Will return an empty string, if no connections exist.</returns>
202+
string ConnectionsToString();
204203

205204
string GetLastMessageRouterResults();
206205

0 commit comments

Comments
 (0)