Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Commit

Permalink
[Sdk] provide full PromptOptions for SwitchSkillDialogOptions (#2717)
Browse files Browse the repository at this point in the history
  • Loading branch information
xieofxie authored and lauren-mills committed Nov 15, 2019
1 parent 348857c commit 18c0a8c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
using System;
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Bot.Builder.Dialogs;
Expand Down Expand Up @@ -57,7 +60,7 @@ private async Task<DialogTurnResult> PromptToSwitchAsync(WaterfallStepContext st
await _skillIdAccessor.SetAsync(stepContext.Context, options.Skill.Id).ConfigureAwait(false);
await _lastActivityAccessor.SetAsync(stepContext.Context, stepContext.Context.Activity).ConfigureAwait(false);

return await stepContext.PromptAsync(_confirmPromptId, new PromptOptions() { Prompt = options.Prompt }).ConfigureAwait(false);
return await stepContext.PromptAsync(_confirmPromptId, options).ConfigureAwait(false);
}

// Ends this dialog, returning the prompt result.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
using Microsoft.Bot.Builder.Solutions.Skills.Models.Manifest;
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Builder.Solutions.Skills.Models.Manifest;
using Microsoft.Bot.Schema;

namespace Microsoft.Bot.Builder.Solutions.Skills.Dialogs
{
public class SwitchSkillDialogOptions
public class SwitchSkillDialogOptions : PromptOptions
{
/// <summary>
/// Initializes a new instance of the <see cref="SwitchSkillDialogOptions"/> class.
Expand All @@ -17,7 +21,5 @@ public SwitchSkillDialogOptions(Activity prompt, SkillManifest manifest)
}

public SkillManifest Skill { get; set; }

public Activity Prompt { get; set; }
}
}

0 comments on commit 18c0a8c

Please sign in to comment.