Skip to content

Commit 10dc0da

Browse files
author
Tracy Boehrer
committed
Removed AdaptiveCards (the package) from Builder.
1 parent 4c11f66 commit 10dc0da

File tree

3 files changed

+4
-16
lines changed

3 files changed

+4
-16
lines changed

src/libraries/Builder/Microsoft.Agents.Builder/App/AdaptiveCards/AdaptiveCardInvokeResponseFactory.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,6 @@ namespace Microsoft.Agents.Builder.App.AdaptiveCards
1111
/// </summary>
1212
public static class AdaptiveCardInvokeResponseFactory
1313
{
14-
/// <summary>
15-
/// Returns response with type "application/vnd.microsoft.card.adaptive".
16-
/// </summary>
17-
/// <param name="adaptiveCard">An AdaptiveCard instance.</param>
18-
/// <returns>The response that includes an Adaptive Card that the client should display.</returns>
19-
public static AdaptiveCardInvokeResponse AdaptiveCard(global::AdaptiveCards.AdaptiveCard adaptiveCard)
20-
{
21-
return AdaptiveCard(adaptiveCard.ToJson());
22-
}
23-
2414
/// <summary>
2515
/// Returns response with type "application/vnd.microsoft.card.adaptive".
2616
/// </summary>

src/libraries/Builder/Microsoft.Agents.Builder/Microsoft.Agents.Builder.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@
1919
</PropertyGroup>
2020

2121
<ItemGroup>
22-
<PackageReference Include="AdaptiveCards" />
2322
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
2423
<PackageReference Include="Microsoft.Extensions.Logging" />
2524
<PackageReference Include="System.IdentityModel.Tokens.Jwt" />
2625
<PackageReference Include="System.Memory.Data" />
2726
<PackageReference Include="System.Text.Json" />
2827
<PackageReference Include="Microsoft.Extensions.Http" />
29-
<PackageReference Include="Newtonsoft.Json" />
3028
</ItemGroup>
3129

3230
<ItemGroup>

src/samples/Compat/SkillsDialog/DialogSkillBot/Dialogs/ActivityRouterDialog.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Threading.Tasks;
66
using Microsoft.Agents.Builder.Dialogs;
77
using Microsoft.Agents.Core.Models;
8-
using Newtonsoft.Json;
8+
using Microsoft.Agents.Core.Serialization;
99

1010
namespace DialogSkillBot.Dialogs
1111
{
@@ -97,7 +97,7 @@ private static async Task<DialogTurnResult> BeginGetWeather(WaterfallStepContext
9797
var location = new Location();
9898
if (activity.Value != null)
9999
{
100-
location = JsonConvert.DeserializeObject<Location>(JsonConvert.SerializeObject(activity.Value));
100+
location = ProtocolJsonSerializer.ToObject<Location>(activity.Value);
101101
}
102102

103103
// We haven't implemented the GetWeatherDialog so we just display a TODO message.
@@ -113,14 +113,14 @@ private async Task<DialogTurnResult> BeginBookFlight(WaterfallStepContext stepCo
113113
var bookingDetails = new BookingDetails();
114114
if (activity.Value != null)
115115
{
116-
bookingDetails = JsonConvert.DeserializeObject<BookingDetails>(JsonConvert.SerializeObject(activity.Value));
116+
bookingDetails = ProtocolJsonSerializer.ToObject<BookingDetails>(activity.Value);
117117
}
118118

119119
// Start the booking dialog.
120120
var bookingDialog = FindDialog(nameof(BookingDialog));
121121
return await stepContext.BeginDialogAsync(bookingDialog.Id, bookingDetails, cancellationToken);
122122
}
123123

124-
private string GetObjectAsJsonString(object value) => value == null ? string.Empty : JsonConvert.SerializeObject(value);
124+
private string GetObjectAsJsonString(object value) => value == null ? string.Empty : ProtocolJsonSerializer.ToJson(value);
125125
}
126126
}

0 commit comments

Comments
 (0)