From 6df7bbeec549f30cb29242a86a06f56c6647303e Mon Sep 17 00:00:00 2001 From: Tom Laird-McConnell <tomlm@microsoft.com> Date: Tue, 8 May 2018 13:10:06 -0700 Subject: [PATCH] remove configure awaits (#4582) * fix OAuth with emulator and no credentials * remove configureawait(False), as we need to keep the callers context for callbacks * bump version to 3.15.2.2 --- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Dialogs/GetTokenDialog.cs | 14 +++++++------- .../Microsoft.Bot.Builder/Dialogs/LuisDialog.cs | 6 +++--- .../Microsoft.Bot.Builder.nuspec | 2 +- .../Properties/AssemblyInfo.cs | 4 ++-- .../Microsoft.Bot.Connector.AspNetCore.nuspec | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../AssemblyInfo.cs | 4 ++-- .../Microsoft.Bot.Connector.AspNetCore2.nuspec | 4 ++-- .../Microsoft.Bot.Connector.nuspec | 2 +- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Microsoft.Bot.Connector.nuspec | 2 +- .../Properties/AssemblyInfo.cs | 4 ++-- .../AssemblyInfo.cs | 4 ++-- 18 files changed, 39 insertions(+), 39 deletions(-) diff --git a/CSharp/Library/Microsoft.Bot.Builder.Autofac/Properties/AssemblyInfo.cs b/CSharp/Library/Microsoft.Bot.Builder.Autofac/Properties/AssemblyInfo.cs index 640019374c..09fbfd568b 100644 --- a/CSharp/Library/Microsoft.Bot.Builder.Autofac/Properties/AssemblyInfo.cs +++ b/CSharp/Library/Microsoft.Bot.Builder.Autofac/Properties/AssemblyInfo.cs @@ -32,8 +32,8 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.15.2.1")] -[assembly: AssemblyFileVersion("3.15.2.1")] +[assembly: AssemblyVersion("3.15.2.2")] +[assembly: AssemblyFileVersion("3.15.2.2")] [assembly: InternalsVisibleTo("Microsoft.Bot.Builder.Tests")] [assembly: InternalsVisibleTo("Microsoft.Bot.Sample.Tests")] diff --git a/CSharp/Library/Microsoft.Bot.Builder.Calling/Properties/AssemblyInfo.cs b/CSharp/Library/Microsoft.Bot.Builder.Calling/Properties/AssemblyInfo.cs index 46acc24b2d..956505b318 100644 --- a/CSharp/Library/Microsoft.Bot.Builder.Calling/Properties/AssemblyInfo.cs +++ b/CSharp/Library/Microsoft.Bot.Builder.Calling/Properties/AssemblyInfo.cs @@ -31,8 +31,8 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.15.2.1")] -[assembly: AssemblyFileVersion("3.15.2.1")] +[assembly: AssemblyVersion("3.15.2.2")] +[assembly: AssemblyFileVersion("3.15.2.2")] //[assembly: AssemblyKeyFileAttribute(@"..\\..\\buildtools\\35MSSharedLib1024.snk")] //[assembly: AssemblyDelaySignAttribute(true)] diff --git a/CSharp/Library/Microsoft.Bot.Builder.FormFlow.Json/Properties/AssemblyInfo.cs b/CSharp/Library/Microsoft.Bot.Builder.FormFlow.Json/Properties/AssemblyInfo.cs index aff7f8186a..d06e54cdb3 100644 --- a/CSharp/Library/Microsoft.Bot.Builder.FormFlow.Json/Properties/AssemblyInfo.cs +++ b/CSharp/Library/Microsoft.Bot.Builder.FormFlow.Json/Properties/AssemblyInfo.cs @@ -33,8 +33,8 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.15.2.1")] -[assembly: AssemblyFileVersion("3.15.2.1")] +[assembly: AssemblyVersion("3.15.2.2")] +[assembly: AssemblyFileVersion("3.15.2.2")] [assembly: InternalsVisibleTo("Microsoft.Bot.Builder.Tests")] [assembly: InternalsVisibleTo("Microsoft.Bot.Sample.Tests")] diff --git a/CSharp/Library/Microsoft.Bot.Builder.History/Properties/AssemblyInfo.cs b/CSharp/Library/Microsoft.Bot.Builder.History/Properties/AssemblyInfo.cs index 69cee70495..29b7679da5 100644 --- a/CSharp/Library/Microsoft.Bot.Builder.History/Properties/AssemblyInfo.cs +++ b/CSharp/Library/Microsoft.Bot.Builder.History/Properties/AssemblyInfo.cs @@ -31,8 +31,8 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.15.2.1")] -[assembly: AssemblyFileVersion("3.15.2.1")] +[assembly: AssemblyVersion("3.15.2.2")] +[assembly: AssemblyFileVersion("3.15.2.2")] //[assembly: AssemblyKeyFileAttribute(@"..\\..\\buildtools\\35MSSharedLib1024.snk")] //[assembly: AssemblyDelaySignAttribute(true)] diff --git a/CSharp/Library/Microsoft.Bot.Builder/Dialogs/GetTokenDialog.cs b/CSharp/Library/Microsoft.Bot.Builder/Dialogs/GetTokenDialog.cs index 2ebc25bbf1..adff08c9c8 100644 --- a/CSharp/Library/Microsoft.Bot.Builder/Dialogs/GetTokenDialog.cs +++ b/CSharp/Library/Microsoft.Bot.Builder/Dialogs/GetTokenDialog.cs @@ -70,7 +70,7 @@ public GetTokenDialog(string connectionName, string signInMessage, string button public async Task StartAsync(IDialogContext context) { // First ask Bot Service if it already has a token for this user - var token = await context.GetUserTokenAsync(_connectionName).ConfigureAwait(false); + var token = await context.GetUserTokenAsync(_connectionName); if (token != null) { context.Done(new GetTokenResponse() { Token = token.Token }); @@ -78,14 +78,14 @@ public async Task StartAsync(IDialogContext context) else { // If Bot Service does not have a token, send an OAuth card to sign in - await SendOAuthCardAsync(context, (Activity)context.Activity).ConfigureAwait(false); + await SendOAuthCardAsync(context, (Activity)context.Activity); } } private async Task SendOAuthCardAsync(IDialogContext context, Activity activity) { - var reply = await activity.CreateOAuthReplyAsync(_connectionName, _signInMessage, _buttonLabel).ConfigureAwait(false); - await context.PostAsync(reply).ConfigureAwait(false); + var reply = await activity.CreateOAuthReplyAsync(_connectionName, _signInMessage, _buttonLabel); + await context.PostAsync(reply); context.Wait(WaitForToken); } @@ -113,7 +113,7 @@ private async Task WaitForToken(IDialogContext context, IAwaitable<object> resul verificationCode = activity.Text; } - tokenResponse = await context.GetUserTokenAsync(_connectionName, verificationCode).ConfigureAwait(false); + tokenResponse = await context.GetUserTokenAsync(_connectionName, verificationCode); if (tokenResponse != null) { context.Done(new GetTokenResponse() { Token = tokenResponse.Token }); @@ -124,8 +124,8 @@ private async Task WaitForToken(IDialogContext context, IAwaitable<object> resul if (_reties > 0) { _reties--; - await context.PostAsync(_retryMessage).ConfigureAwait(false); - await SendOAuthCardAsync(context, activity).ConfigureAwait(false); + await context.PostAsync(_retryMessage); + await SendOAuthCardAsync(context, activity); } else { diff --git a/CSharp/Library/Microsoft.Bot.Builder/Dialogs/LuisDialog.cs b/CSharp/Library/Microsoft.Bot.Builder/Dialogs/LuisDialog.cs index 289bd12f46..2b5a17a455 100644 --- a/CSharp/Library/Microsoft.Bot.Builder/Dialogs/LuisDialog.cs +++ b/CSharp/Library/Microsoft.Bot.Builder/Dialogs/LuisDialog.cs @@ -223,7 +223,7 @@ protected virtual async Task MessageReceived(IDialogContext context, IAwaitable< var tasks = this.services.Select(async s => { var request = ModifyLuisRequest(s.ModifyRequest(new LuisRequest(messageText))); - var result = await s.QueryAsync(request, context.CancellationToken).ConfigureAwait(false); + var result = await s.QueryAsync(request, context.CancellationToken); return Tuple.Create(request, result); }).ToArray(); @@ -243,7 +243,7 @@ protected virtual async Task MessageReceived(IDialogContext context, IAwaitable< throw new InvalidOperationException("No winning intent selected from Luis results."); } - await EmitTraceInfo(context, winner.Result, winner.LuisRequest, winner.LuisService.LuisModel).ConfigureAwait(false); + await EmitTraceInfo(context, winner.Result, winner.LuisRequest, winner.LuisService.LuisModel); if (winner.Result.Dialog?.Status == DialogResponse.DialogStatus.Question) { @@ -329,7 +329,7 @@ private static async Task EmitTraceInfo(IBotContext context, LuisResult luisResu LuisModel = RemoveSensitiveData(luisModel) }; var activity = Activity.CreateTraceActivityReply(context.Activity as Activity, LuisTraceName, LuisTraceType, luisTraceInfo, LuisTraceLabel) as IMessageActivity; - await context.PostAsync(activity).ConfigureAwait(false); + await context.PostAsync(activity); } public static ILuisModel RemoveSensitiveData(ILuisModel luisModel) diff --git a/CSharp/Library/Microsoft.Bot.Builder/Microsoft.Bot.Builder.nuspec b/CSharp/Library/Microsoft.Bot.Builder/Microsoft.Bot.Builder.nuspec index ae0553c7fa..e68476910d 100644 --- a/CSharp/Library/Microsoft.Bot.Builder/Microsoft.Bot.Builder.nuspec +++ b/CSharp/Library/Microsoft.Bot.Builder/Microsoft.Bot.Builder.nuspec @@ -28,7 +28,7 @@ <dependency id="Autofac" version="3.5.2"/> <dependency id="Chronic.Signed" version="0.3.2" /> <dependency id="Microsoft.AspNet.WebAPI.Core" version="5.2.3" /> - <dependency id="Microsoft.Bot.Connector" version="3.15.2.1" /> + <dependency id="Microsoft.Bot.Connector" version="3.15.2.2" /> <dependency id="Microsoft.Rest.ClientRuntime" version="2.3.2" /> <dependency id="Newtonsoft.Json" version="9.0.1" /> <dependency id="System.IdentityModel.Tokens.Jwt" version="5.1.4" /> diff --git a/CSharp/Library/Microsoft.Bot.Builder/Properties/AssemblyInfo.cs b/CSharp/Library/Microsoft.Bot.Builder/Properties/AssemblyInfo.cs index ed1b77e14b..03e81097a4 100644 --- a/CSharp/Library/Microsoft.Bot.Builder/Properties/AssemblyInfo.cs +++ b/CSharp/Library/Microsoft.Bot.Builder/Properties/AssemblyInfo.cs @@ -33,8 +33,8 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.15.2.1")] -[assembly: AssemblyFileVersion("3.15.2.1")] +[assembly: AssemblyVersion("3.15.2.2")] +[assembly: AssemblyFileVersion("3.15.2.2")] [assembly: InternalsVisibleTo("Microsoft.Bot.Builder.Tests")] diff --git a/CSharp/Library/Microsoft.Bot.Connector.AspNetCore/Microsoft.Bot.Connector.AspNetCore.nuspec b/CSharp/Library/Microsoft.Bot.Connector.AspNetCore/Microsoft.Bot.Connector.AspNetCore.nuspec index 2d6d01e7bb..5f9f64561b 100644 --- a/CSharp/Library/Microsoft.Bot.Connector.AspNetCore/Microsoft.Bot.Connector.AspNetCore.nuspec +++ b/CSharp/Library/Microsoft.Bot.Connector.AspNetCore/Microsoft.Bot.Connector.AspNetCore.nuspec @@ -2,7 +2,7 @@ <package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <id>Microsoft.Bot.Connector.AspNetCore</id> - <version>1.1.3.14</version> + <version>1.1.3.15</version> <authors>Microsoft</authors> <owners>microsoft, BotFramework, nugetbotbuilder </owners> <iconUrl>https://bots.botframework.com/Client/Images/bot-framework-default-7.png</iconUrl> @@ -22,7 +22,7 @@ <dependency id="Newtonsoft.Json" version="9.0.1" /> <dependency id="System.IdentityModel.Tokens.Jwt" version="5.1.4" /> <dependency id="Microsoft.AspNetCore.Mvc.Core" version="1.1.4" /> - <dependency id="Microsoft.Bot.Connector" version="3.15.2.1" /> + <dependency id="Microsoft.Bot.Connector" version="3.15.2.2" /> </group> </dependencies> </metadata> diff --git a/CSharp/Library/Microsoft.Bot.Connector.AspNetCore/Properties/AssemblyInfo.cs b/CSharp/Library/Microsoft.Bot.Connector.AspNetCore/Properties/AssemblyInfo.cs index ea839006e2..ee0e83639a 100644 --- a/CSharp/Library/Microsoft.Bot.Connector.AspNetCore/Properties/AssemblyInfo.cs +++ b/CSharp/Library/Microsoft.Bot.Connector.AspNetCore/Properties/AssemblyInfo.cs @@ -12,8 +12,8 @@ [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("1.1.3.14")] -[assembly: AssemblyFileVersion("1.1.3.14")] +[assembly: AssemblyVersion("1.1.3.15")] +[assembly: AssemblyFileVersion("1.1.3.15")] //[assembly: AssemblyKeyFileAttribute(@"..\\..\\buildtools\\35MSSharedLib1024.snk")] //[assembly: AssemblyDelaySignAttribute(true)] diff --git a/CSharp/Library/Microsoft.Bot.Connector.AspNetCore2/AssemblyInfo.cs b/CSharp/Library/Microsoft.Bot.Connector.AspNetCore2/AssemblyInfo.cs index 6e29c93333..ebd1f71995 100644 --- a/CSharp/Library/Microsoft.Bot.Connector.AspNetCore2/AssemblyInfo.cs +++ b/CSharp/Library/Microsoft.Bot.Connector.AspNetCore2/AssemblyInfo.cs @@ -10,8 +10,8 @@ [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("2.0.1.6")] -[assembly: AssemblyFileVersion("2.0.1.6")] +[assembly: AssemblyVersion("2.0.1.7")] +[assembly: AssemblyFileVersion("2.0.1.7")] //[assembly: AssemblyKeyFileAttribute(@"..\\..\\buildtools\\35MSSharedLib1024.snk")] //[assembly: AssemblyDelaySignAttribute(true)] diff --git a/CSharp/Library/Microsoft.Bot.Connector.AspNetCore2/Microsoft.Bot.Connector.AspNetCore2.nuspec b/CSharp/Library/Microsoft.Bot.Connector.AspNetCore2/Microsoft.Bot.Connector.AspNetCore2.nuspec index 5878fb42d3..fd1ac739ec 100644 --- a/CSharp/Library/Microsoft.Bot.Connector.AspNetCore2/Microsoft.Bot.Connector.AspNetCore2.nuspec +++ b/CSharp/Library/Microsoft.Bot.Connector.AspNetCore2/Microsoft.Bot.Connector.AspNetCore2.nuspec @@ -2,7 +2,7 @@ <package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <id>Microsoft.Bot.Connector.AspNetCore</id> - <version>2.0.1.6</version> + <version>2.0.1.7</version> <authors>Microsoft</authors> <owners>microsoft, BotFramework, nugetbotbuilder </owners> <iconUrl>https://bots.botframework.com/Client/Images/bot-framework-default-7.png</iconUrl> @@ -19,7 +19,7 @@ <dependency id="Microsoft.AspNetCore.Authentication.JwtBearer" version="2.0.0" /> <dependency id="Microsoft.AspNetCore.Mvc" version="2.0.0" /> <dependency id="Microsoft.Rest.ClientRuntime" version="2.3.10" /> - <dependency id="Microsoft.Bot.Connector" version="3.15.2.1" /> + <dependency id="Microsoft.Bot.Connector" version="3.15.2.2" /> </group> </dependencies> </metadata> diff --git a/CSharp/Library/Microsoft.Bot.Connector.Falcon/Microsoft.Bot.Connector.nuspec b/CSharp/Library/Microsoft.Bot.Connector.Falcon/Microsoft.Bot.Connector.nuspec index 0345960357..a6add3cf4f 100644 --- a/CSharp/Library/Microsoft.Bot.Connector.Falcon/Microsoft.Bot.Connector.nuspec +++ b/CSharp/Library/Microsoft.Bot.Connector.Falcon/Microsoft.Bot.Connector.nuspec @@ -2,7 +2,7 @@ <package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <id>Microsoft.Bot.Connector</id> - <version>3.15.2.1</version> + <version>3.15.2.2</version> <authors>Microsoft</authors> <owners>microsoft, BotFramework, nugetbotbuilder </owners> <iconUrl>https://bots.botframework.com/Client/Images/bot-framework-default-7.png</iconUrl> diff --git a/CSharp/Library/Microsoft.Bot.Connector.Falcon/Properties/AssemblyInfo.cs b/CSharp/Library/Microsoft.Bot.Connector.Falcon/Properties/AssemblyInfo.cs index 1301979e90..7765d23c5b 100644 --- a/CSharp/Library/Microsoft.Bot.Connector.Falcon/Properties/AssemblyInfo.cs +++ b/CSharp/Library/Microsoft.Bot.Connector.Falcon/Properties/AssemblyInfo.cs @@ -10,8 +10,8 @@ [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("3.15.2.1")] -[assembly: AssemblyFileVersion("3.15.2.1")] +[assembly: AssemblyVersion("3.15.2.2")] +[assembly: AssemblyFileVersion("3.15.2.2")] //[assembly: AssemblyKeyFileAttribute(@"..\\..\\buildtools\\35MSSharedLib1024.snk")] //[assembly: AssemblyDelaySignAttribute(true)] diff --git a/CSharp/Library/Microsoft.Bot.Connector.NetCore/Properties/AssemblyInfo.cs b/CSharp/Library/Microsoft.Bot.Connector.NetCore/Properties/AssemblyInfo.cs index 57896579c9..4830752b2f 100644 --- a/CSharp/Library/Microsoft.Bot.Connector.NetCore/Properties/AssemblyInfo.cs +++ b/CSharp/Library/Microsoft.Bot.Connector.NetCore/Properties/AssemblyInfo.cs @@ -1,8 +1,8 @@ using System.Reflection; using System.Resources; -[assembly: AssemblyVersion("3.15.2.1")] -[assembly: AssemblyFileVersion("3.15.2.1")] +[assembly: AssemblyVersion("3.15.2.2")] +[assembly: AssemblyFileVersion("3.15.2.2")] //[assembly: AssemblyKeyFileAttribute(@"..\\..\\buildtools\\35MSSharedLib1024.snk")] //[assembly: AssemblyDelaySignAttribute(true)] diff --git a/CSharp/Library/Microsoft.Bot.Connector.NetFramework/Microsoft.Bot.Connector.nuspec b/CSharp/Library/Microsoft.Bot.Connector.NetFramework/Microsoft.Bot.Connector.nuspec index fa7277dc3e..7f82e12e4a 100644 --- a/CSharp/Library/Microsoft.Bot.Connector.NetFramework/Microsoft.Bot.Connector.nuspec +++ b/CSharp/Library/Microsoft.Bot.Connector.NetFramework/Microsoft.Bot.Connector.nuspec @@ -2,7 +2,7 @@ <package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <id>Microsoft.Bot.Connector</id> - <version>3.15.2.1</version> + <version>3.15.2.2</version> <authors>Microsoft</authors> <owners>microsoft, BotFramework, nugetbotbuilder </owners> <iconUrl>https://bots.botframework.com/Client/Images/bot-framework-default-7.png</iconUrl> diff --git a/CSharp/Library/Microsoft.Bot.Connector.NetFramework/Properties/AssemblyInfo.cs b/CSharp/Library/Microsoft.Bot.Connector.NetFramework/Properties/AssemblyInfo.cs index 928207a46c..0602e88904 100644 --- a/CSharp/Library/Microsoft.Bot.Connector.NetFramework/Properties/AssemblyInfo.cs +++ b/CSharp/Library/Microsoft.Bot.Connector.NetFramework/Properties/AssemblyInfo.cs @@ -10,8 +10,8 @@ [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("3.15.2.1")] -[assembly: AssemblyFileVersion("3.15.2.1")] +[assembly: AssemblyVersion("3.15.2.2")] +[assembly: AssemblyFileVersion("3.15.2.2")] //[assembly: AssemblyKeyFileAttribute(@"..\\..\\buildtools\\35MSSharedLib1024.snk")] //[assembly: AssemblyDelaySignAttribute(true)] diff --git a/CSharp/Library/Microsoft.Bot.Connector.Standard/AssemblyInfo.cs b/CSharp/Library/Microsoft.Bot.Connector.Standard/AssemblyInfo.cs index 426b60cd1c..4a768a57ca 100644 --- a/CSharp/Library/Microsoft.Bot.Connector.Standard/AssemblyInfo.cs +++ b/CSharp/Library/Microsoft.Bot.Connector.Standard/AssemblyInfo.cs @@ -1,8 +1,8 @@ using System.Reflection; using System.Runtime.InteropServices; -[assembly: AssemblyVersion("3.15.2.1")] -[assembly: AssemblyFileVersion("3.15.2.1")] +[assembly: AssemblyVersion("3.15.2.2")] +[assembly: AssemblyFileVersion("3.15.2.2")] //[assembly: AssemblyKeyFileAttribute(@"..\\..\\buildtools\\35MSSharedLib1024.snk")] //[assembly: AssemblyDelaySignAttribute(true)]