remove IDialog for Dialog abstract class

This commit is contained in:
Tom Laird-McConnell 2019-09-04 17:05:51 -07:00
Родитель 29fa7b9e3b
Коммит 510acbc6f1
90 изменённых файлов: 506 добавлений и 624 удалений

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "QnAMaker Dialog",
"description": "This represents a dialog which is driven by a call to QnAMaker.ai knowledge base",
"type": "object",

Просмотреть файл

@ -43,7 +43,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Actions
/// <summary>
/// Gets or sets the dialog to call.
/// </summary>
public IDialog Dialog { get; set; }
public Dialog Dialog { get; set; }
/// <summary>
/// Gets or sets the property from memory to pass to the calling dialog and to set the return value to.
@ -65,14 +65,14 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Actions
}
}
public override List<IDialog> ListDependencies()
public override List<Dialog> ListDependencies()
{
if (Dialog != null)
{
return new List<IDialog>() { Dialog };
return new List<Dialog>() { Dialog };
}
return new List<IDialog>();
return new List<Dialog>();
}
protected override string OnComputeId()
@ -80,7 +80,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Actions
return $"{this.GetType().Name}[{Dialog?.Id ?? this.dialogIdToCall}:{this.BindingPath()}]";
}
protected IDialog ResolveDialog(DialogContext dc)
protected Dialog ResolveDialog(DialogContext dc)
{
if (this.Dialog != null)
{

Просмотреть файл

@ -11,7 +11,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Actions
/// <summary>
/// Class which allows you to edit the current actions.
/// </summary>
public class EditActions : DialogAction, IDialogDependencies
public class EditActions : DialogAction
{
/// <summary>
/// Initializes a new instance of the <see cref="EditActions"/> class.
@ -32,7 +32,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Actions
/// The actions to be applied to the active action.
/// </value>
[JsonProperty("actions")]
public List<IDialog> Actions { get; set; } = new List<IDialog>();
public List<Dialog> Actions { get; set; } = new List<Dialog>();
/// <summary>
/// Gets or sets the type of change to appy to the active actions.
@ -43,7 +43,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Actions
[JsonProperty("changeType")]
public ActionChangeType ChangeType { get; set; }
public override List<IDialog> ListDependencies()
public override List<Dialog> ListDependencies()
{
return this.Actions;
}

Просмотреть файл

@ -16,7 +16,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Actions
/// <summary>
/// Executes a set of actions once for each item in an in-memory list or collection.
/// </summary>
public class Foreach : DialogAction, IDialogDependencies
public class Foreach : DialogAction
{
private Expression listProperty;
@ -45,9 +45,9 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Actions
// Actions to be run for each of items.
[JsonProperty("actions")]
public List<IDialog> Actions { get; set; } = new List<IDialog>();
public List<Dialog> Actions { get; set; } = new List<Dialog>();
public override List<IDialog> ListDependencies()
public override List<Dialog> ListDependencies()
{
return this.Actions;
}

Просмотреть файл

@ -17,7 +17,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Actions
/// <summary>
/// Executes a set of actions once for each item in an in-memory list or collection.
/// </summary>
public class ForeachPage : DialogAction, IDialogDependencies
public class ForeachPage : DialogAction
{
private Expression listProperty;
@ -45,9 +45,9 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Actions
// Actions to be run for each of items.
[JsonProperty("actions")]
public List<IDialog> Actions { get; set; } = new List<IDialog>();
public List<Dialog> Actions { get; set; } = new List<Dialog>();
public override List<IDialog> ListDependencies()
public override List<Dialog> ListDependencies()
{
return this.Actions;
}

Просмотреть файл

@ -16,7 +16,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Actions
/// <summary>
/// Conditional branch.
/// </summary>
public class IfCondition : DialogAction, IDialogDependencies
public class IfCondition : DialogAction
{
private Expression condition;
@ -51,14 +51,14 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Actions
}
[JsonProperty("actions")]
public List<IDialog> Actions { get; set; } = new List<IDialog>();
public List<Dialog> Actions { get; set; } = new List<Dialog>();
[JsonProperty("elseActions")]
public List<IDialog> ElseActions { get; set; } = new List<IDialog>();
public List<Dialog> ElseActions { get; set; } = new List<Dialog>();
public override List<IDialog> ListDependencies()
public override List<Dialog> ListDependencies()
{
var combined = new List<IDialog>(Actions);
var combined = new List<Dialog>(Actions);
combined.AddRange(ElseActions);
return combined;
}
@ -76,7 +76,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Actions
var (value, error) = condition.TryEvaluate(dc.State);
var conditionResult = error == null && value != null && (bool)value;
var actions = new List<IDialog>();
var actions = new List<Dialog>();
if (conditionResult == true)
{
actions = this.Actions;

Просмотреть файл

@ -16,7 +16,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Actions
/// <summary>
/// Conditional branch with multiple cases.
/// </summary>
public class SwitchCondition : DialogAction, IDialogDependencies
public class SwitchCondition : DialogAction
{
/// <summary>
/// Cases.
@ -53,11 +53,11 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Actions
/// <value>
/// Default case.
/// </value>
public List<IDialog> Default { get; set; } = new List<IDialog>();
public List<Dialog> Default { get; set; } = new List<Dialog>();
public override List<IDialog> ListDependencies()
public override List<Dialog> ListDependencies()
{
var dialogs = new List<IDialog>();
var dialogs = new List<Dialog>();
if (this.Default != null)
{
dialogs.AddRange(this.Default);
@ -101,7 +101,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Actions
}
}
List<IDialog> actionsToRun = this.Default;
List<Dialog> actionsToRun = this.Default;
foreach (var caseCondition in this.Cases)
{
@ -151,7 +151,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Actions
public class Case
{
public Case(string value = null, IEnumerable<IDialog> actions = null)
public Case(string value = null, IEnumerable<Dialog> actions = null)
{
this.Value = value;
this.Actions = actions?.ToList() ?? this.Actions;
@ -173,7 +173,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Actions
/// Set of actions to be executed given that the condition of the switch matches the value of this case.
/// </value>
[JsonProperty("actions")]
public List<IDialog> Actions { get; set; } = new List<IDialog>();
public List<Dialog> Actions { get; set; } = new List<Dialog>();
/// <summary>
/// Creates an expression that returns the value in its primitive type. Still

Просмотреть файл

@ -198,7 +198,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive
}
}
public void AddDialogs(IEnumerable<IDialog> dialogs)
public void AddDialogs(IEnumerable<Dialog> dialogs)
{
foreach (var dialog in dialogs)
{

Просмотреть файл

@ -17,7 +17,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events
public class OnActivity : OnDialogEvent
{
[JsonConstructor]
public OnActivity(string type = null, List<IDialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
public OnActivity(string type = null, List<Dialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
: base(
events: new List<string>() { AdaptiveEvents.ActivityReceived },
actions: actions,

Просмотреть файл

@ -13,7 +13,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events
public class OnBeginDialog : OnDialogEvent
{
[JsonConstructor]
public OnBeginDialog(List<IDialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
public OnBeginDialog(List<Dialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
: base(
events: new List<string>()
{

Просмотреть файл

@ -14,7 +14,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events
public class OnConversationUpdateActivity : OnActivity
{
[JsonConstructor]
public OnConversationUpdateActivity(List<IDialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
public OnConversationUpdateActivity(List<Dialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
: base(type: ActivityTypes.ConversationUpdate, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine)
{
}

Просмотреть файл

@ -14,11 +14,11 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events
public class OnDialogEvent : OnEvent
{
[JsonConstructor]
public OnDialogEvent(List<string> events = null, List<IDialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
public OnDialogEvent(List<string> events = null, List<Dialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
: base(constraint: constraint, actions: actions, callerPath: callerPath, callerLine: callerLine)
{
this.Events = events ?? new List<string>();
this.Actions = actions ?? new List<IDialog>();
this.Actions = actions ?? new List<Dialog>();
}
/// <summary>

Просмотреть файл

@ -14,7 +14,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events
public class OnEndOfConversationActivity : OnActivity
{
[JsonConstructor]
public OnEndOfConversationActivity(List<IDialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
public OnEndOfConversationActivity(List<Dialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
: base(type: ActivityTypes.EndOfConversation, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine)
{
}

Просмотреть файл

@ -27,7 +27,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events
private Expression fullConstraint = null;
[JsonConstructor]
public OnEvent(string constraint = null, List<IDialog> actions = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
public OnEvent(string constraint = null, List<Dialog> actions = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
{
this.RegisterSourceLocation(callerPath, callerLine);
@ -51,7 +51,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events
/// The actions to add to the plan when the rule constraints are met.
/// </value>
[JsonProperty("actions")]
public List<IDialog> Actions { get; set; } = new List<IDialog>();
public List<Dialog> Actions { get; set; } = new List<Dialog>();
/// <summary>
/// Get the expression for this rule by calling GatherConstraints().

Просмотреть файл

@ -14,7 +14,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events
public class OnEventActivity : OnActivity
{
[JsonConstructor]
public OnEventActivity(List<IDialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
public OnEventActivity(List<Dialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
: base(type: ActivityTypes.Event, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine)
{
}

Просмотреть файл

@ -14,7 +14,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events
public class OnHandoffActivity : OnActivity
{
[JsonConstructor]
public OnHandoffActivity(List<IDialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
public OnHandoffActivity(List<Dialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
: base(type: ActivityTypes.Handoff, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine)
{
}

Просмотреть файл

@ -18,7 +18,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events
public class OnIntent : OnDialogEvent
{
[JsonConstructor]
public OnIntent(string intent = null, List<string> entities = null, List<IDialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
public OnIntent(string intent = null, List<string> entities = null, List<Dialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
: base(
events: new List<string>() { AdaptiveEvents.RecognizedIntent },
actions: actions,

Просмотреть файл

@ -14,7 +14,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events
public class OnInvokeActivity : OnActivity
{
[JsonConstructor]
public OnInvokeActivity(List<IDialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
public OnInvokeActivity(List<Dialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
: base(type: ActivityTypes.Invoke, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine)
{
}

Просмотреть файл

@ -14,7 +14,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events
public class OnMessageActivity : OnActivity
{
[JsonConstructor]
public OnMessageActivity(List<IDialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
public OnMessageActivity(List<Dialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
: base(type: ActivityTypes.Message, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine)
{
}

Просмотреть файл

@ -14,7 +14,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events
public class OnMessageDeleteActivity : OnActivity
{
[JsonConstructor]
public OnMessageDeleteActivity(List<IDialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
public OnMessageDeleteActivity(List<Dialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
: base(type: ActivityTypes.MessageDelete, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine)
{
}

Просмотреть файл

@ -14,7 +14,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events
public class OnMessageReactionActivity : OnActivity
{
[JsonConstructor]
public OnMessageReactionActivity(List<IDialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
public OnMessageReactionActivity(List<Dialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
: base(type: ActivityTypes.MessageReaction, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine)
{
}

Просмотреть файл

@ -14,7 +14,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events
public class OnMessageUpdateActivity : OnActivity
{
[JsonConstructor]
public OnMessageUpdateActivity(List<IDialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
public OnMessageUpdateActivity(List<Dialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
: base(type: ActivityTypes.MessageUpdate, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine)
{
}

Просмотреть файл

@ -14,7 +14,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events
public class OnTypingActivity : OnActivity
{
[JsonConstructor]
public OnTypingActivity(List<IDialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
public OnTypingActivity(List<Dialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
: base(type: ActivityTypes.Typing, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine)
{
}

Просмотреть файл

@ -17,7 +17,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events
public class OnUnknownIntent : OnDialogEvent
{
[JsonConstructor]
public OnUnknownIntent(List<IDialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
public OnUnknownIntent(List<Dialog> actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0)
: base(
events: new List<string>()
{

Просмотреть файл

@ -15,7 +15,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive
/// <value>
/// Actions to add to the plan when the rule is activated.
/// </value>
List<IDialog> Actions { get; }
List<Dialog> Actions { get; }
/// <summary>
/// Get the expression for this rule.

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Begin Dialog",
"description": "Action which begins another dialog (and when that dialog is done, it will return the caller).",
"type": "object",
@ -11,7 +11,7 @@
{
"properties": {
"dialog": {
"$type": "Microsoft.IDialog",
"$type": "Microsoft.Dialog",
"title": "Dialog",
"description": "This is the dialog to call."
},

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Cancel All Dialogs",
"description": "Command to cancel all of the current dialogs by emitting an event which must be caught to prevent cancelation from propagating.",
"type": "object",

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Debugger Break Action",
"description": "If debugger is attached, do a debugger break at this point",
"type": "object",

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Delete Property",
"description": "This is a action which allows you to remove a property from memory",
"type": "object",

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "EditActions Action",
"description": "Edit current dialog with changeType and Actions",
"type": "object",
@ -29,7 +29,7 @@
"actions": {
"type": "array",
"items": {
"$type": "Microsoft.IDialog"
"$type": "Microsoft.Dialog"
},
"title": "Actions",
"description": "Actions to execute"

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Edit Array Action",
"description": "This is a action which allows you to modify an array in memory",
"type": "object",

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Emit Event Action",
"description": "This is a action which allows you to emit an event",
"type": "object",

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "End Dialog",
"description": "Command which ends the current dialog, returning the resultProperty as the result of the dialog.",
"type": "object",

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "End Turn",
"description": "End the current turn without ending the dialog.",
"type": "object",

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Foreach Action",
"description": "Action which executes actions per item in a collection.",
"type": "object",
@ -21,7 +21,7 @@
"actions": {
"type": "array",
"items": {
"$type": "Microsoft.IDialog"
"$type": "Microsoft.Dialog"
},
"title": "Actions",
"description": "Actions to execute"

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Foreach Page Action",
"description": "Action which execute actions per item page in a collection.",
"type": "object",
@ -21,7 +21,7 @@
"actions": {
"type": "array",
"items": {
"$type": "Microsoft.IDialog"
"$type": "Microsoft.Dialog"
},
"title": "Actions",
"description": "Actions to execute"

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"type": "object",
"title": "Http Request",
"description": "This is a action which replaces the current dialog with the target dialog",

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "If Condition Action",
"description": "Action which conditionally decides which action to execute next.",
"type": "object",
@ -25,7 +25,7 @@
"actions": {
"type": "array",
"items": {
"$type": "Microsoft.IDialog"
"$type": "Microsoft.Dialog"
},
"title": "Actions",
"description": "Action to execute if condition is true."
@ -33,7 +33,7 @@
"elseActions": {
"type": "array",
"items": {
"$type": "Microsoft.IDialog"
"$type": "Microsoft.Dialog"
},
"title": "Else Actions",
"description": "Action to execute if condition is false."

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Init Property Action",
"description": "This action allows you to innitial a property to either an object or array",
"type": "object",

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Log Action",
"description": "This is a action which writes to console.log and optional creates a TraceActivity around a text binding",
"type": "object",

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"type": "object",
"title": "Repeat Dialog",
"description": "This is a action which repeats the current dialog with the same dialog.",

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"type": "object",
"title": "Replace Dialog",
"description": "This is a action which replaces the current dialog with the target dialog",
@ -11,7 +11,7 @@
{
"properties": {
"dialog": {
"$type": "Microsoft.IDialog",
"$type": "Microsoft.Dialog",
"title": "Dialog",
"description": "This is the dialog to switch to."
},

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Send Activity Action",
"description": "This is a action which sends an activity to the user",
"type": "object",

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Set Property Action",
"description": "This action allows you to set memory to the value of an expression",
"type": "object",

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Switch Action",
"description": "Action which conditionally decides which action to execute next.",
"type": "object",
@ -36,7 +36,7 @@
"actions": {
"type": "array",
"items": {
"$type": "Microsoft.IDialog"
"$type": "Microsoft.Dialog"
},
"title": "Actions",
"description": "Actions to execute if case is equal to condition"
@ -51,7 +51,7 @@
"default": {
"type": "array",
"items": {
"$type": "Microsoft.IDialog"
"$type": "Microsoft.Dialog"
},
"title": "Default",
"description": "Action to execute if no case is equal to condition"

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Trace Activity Action",
"description": "This is a action which sends an TraceActivity to the transcript",
"type": "object",

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Adaptive Dialog",
"description": "Configures a data driven dialog via a collection of actions/dialogs.",
"type": "object",

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "AttachmentInput Dialog",
"description": "This represents a dialog which gathers an attachment such as image or music",
"allOf": [

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "ChoiceInput Dialog",
"description": "This represents a dialog which gathers a choice responses",
"type": "object",

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "ConfirmInput Dialog",
"description": "This represents a dialog which gathers a yes/no style responses",
"type": "object",

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "DateTimeInput Dialog",
"description": "This represents a dialog which gathers Date or Time or DateTime from the user",
"type": "object",

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "NumberInput Dialog",
"description": "This represents a dialog which gathers a decimal number in a specified range",
"type": "object",

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "OAuthInput Dialog",
"description": "This represents a dialog which gathers an OAuth token from user",
"type": "object",

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "TextInput Dialog",
"description": "This represents a dialog which gathers a text from the user",
"type": "object",

Просмотреть файл

@ -17,7 +17,7 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog"
"$type": "Microsoft.Dialog"
}
}
},

Просмотреть файл

@ -224,7 +224,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive
/// </summary>
/// <param name="dialog">The dialog to be tested.</param>
/// <returns>Whether the passed dialog should inherit dialog-level state.</returns>
protected override bool ShouldInheritState(IDialog dialog)
protected override bool ShouldInheritState(Dialog dialog)
{
return base.ShouldInheritState(dialog) || dialog is InputDialog;
}

Просмотреть файл

@ -28,7 +28,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Debugging
string ICodeModel.NameFor(object item)
{
var type = item.GetType().Name;
if (item is IDialog dialog)
if (item is Dialog dialog)
{
return dialog.Id;
}

Просмотреть файл

@ -88,7 +88,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Declarative
TypeNameHandling = TypeNameHandling.Auto,
Converters = new List<JsonConverter>()
{
new InterfaceConverter<IDialog>(refResolver, registry, paths),
new InterfaceConverter<Dialog>(refResolver, registry, paths),
new InterfaceConverter<IOnEvent>(refResolver, registry, paths),
new InterfaceConverter<IStorage>(refResolver, registry, paths),
new InterfaceConverter<IRecognizer>(refResolver, registry, paths),

Просмотреть файл

@ -33,7 +33,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Declarative.Loaders
foreach (var dialogJObj in dialogs)
{
var innerDialog = dialogJObj.ToObject<IDialog>(serializer);
var innerDialog = dialogJObj.ToObject<Dialog>(serializer);
dialog.AddDialog(innerDialog);
}
}

Просмотреть файл

@ -146,7 +146,7 @@ namespace Microsoft.Bot.Builder.Dialogs
/// <param name="dialog">The dialog to add.</param>
/// <returns>The updated <see cref="ComponentDialog"/>.</returns>
/// <remarks>Adding a new dialog will inherit the <see cref="IBotTelemetryClient"/> of the ComponentDialog.</remarks>
public override Dialog AddDialog(IDialog dialog)
public override Dialog AddDialog(Dialog dialog)
{
base.AddDialog(dialog);
@ -163,7 +163,7 @@ namespace Microsoft.Bot.Builder.Dialogs
/// </summary>
/// <param name="dialogId">The ID of the dialog to find.</param>
/// <returns>The dialog; or <c>null</c> if there is not a match for the ID.</returns>
public new IDialog FindDialog(string dialogId)
public new Dialog FindDialog(string dialogId)
{
return _dialogs.Find(dialogId);
}

Просмотреть файл

@ -22,7 +22,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Debugging
public static IDebugger GetDebugger(this DialogContext context) =>
context.Context.GetDebugger();
public static async Task DebuggerStepAsync(this DialogContext context, IDialog dialog, string more, CancellationToken cancellationToken)
public static async Task DebuggerStepAsync(this DialogContext context, Dialog dialog, string more, CancellationToken cancellationToken)
{
await context.GetDebugger().StepAsync(context, dialog, more, cancellationToken).ConfigureAwait(false);
}

Просмотреть файл

@ -14,7 +14,7 @@ namespace Microsoft.Bot.Builder.Dialogs
/// Base class for all dialogs.
/// </summary>
[DebuggerDisplay("{Id}")]
public abstract class Dialog : IDialog
public abstract class Dialog
{
public static readonly DialogTurnResult EndOfTurn = new DialogTurnResult(DialogTurnStatus.Waiting);

Просмотреть файл

@ -17,9 +17,9 @@ namespace Microsoft.Bot.Builder.Dialogs
return OnRunCommandAsync(dc, options);
}
public virtual List<IDialog> ListDependencies()
public virtual List<Dialog> ListDependencies()
{
return new List<IDialog>();
return new List<Dialog>();
}
protected abstract Task<DialogTurnResult> OnRunCommandAsync(DialogContext dc, object options = null, CancellationToken cancellationToken = default(CancellationToken));

Просмотреть файл

@ -14,13 +14,13 @@ namespace Microsoft.Bot.Builder.Dialogs
public abstract DialogContext CreateChildContext(DialogContext dc);
public virtual Dialog AddDialog(IDialog dialog)
public virtual Dialog AddDialog(Dialog dialog)
{
this._dialogs.Add(dialog);
return this;
}
public IDialog FindDialog(string dialogId)
public Dialog FindDialog(string dialogId)
{
return this._dialogs.Find(dialogId);
}

Просмотреть файл

@ -568,7 +568,7 @@ namespace Microsoft.Bot.Builder.Dialogs
/// </summary>
/// <param name="dialogId">dialog id to find.</param>
/// <returns>dialog with that id.</returns>
public IDialog FindDialog(string dialogId)
public Dialog FindDialog(string dialogId)
{
if (this.Dialogs != null)
{
@ -649,7 +649,7 @@ namespace Microsoft.Bot.Builder.Dialogs
/// </summary>
/// <param name="dialog">The dialog to be tested.</param>
/// <returns>Whether the passed dialog should inherit dialog-level state.</returns>
protected virtual bool ShouldInheritState(IDialog dialog)
protected virtual bool ShouldInheritState(Dialog dialog)
{
return dialog is DialogAction;
}

Просмотреть файл

@ -26,7 +26,7 @@ namespace Microsoft.Bot.Builder.Dialogs
private DialogSet dialogSet;
private string rootDialogId;
public DialogManager(IDialog rootDialog = null)
public DialogManager(Dialog rootDialog = null)
{
this.dialogSet = new DialogSet();
@ -148,7 +148,7 @@ namespace Microsoft.Bot.Builder.Dialogs
/// <value>
/// Root dialog to use to start conversation.
/// </value>
public IDialog RootDialog
public Dialog RootDialog
{
get
{

Просмотреть файл

@ -14,7 +14,7 @@ namespace Microsoft.Bot.Builder.Dialogs
public class DialogSet
{
private readonly IStatePropertyAccessor<DialogState> _dialogState;
private readonly IDictionary<string, IDialog> _dialogs = new Dictionary<string, IDialog>();
private readonly IDictionary<string, Dialog> _dialogs = new Dictionary<string, Dialog>();
private IBotTelemetryClient _telemetryClient;
@ -62,7 +62,7 @@ namespace Microsoft.Bot.Builder.Dialogs
/// <param name="dialog">The dialog to add.</param>
/// <returns>The DialogSet for fluent calls to Add().</returns>
/// <remarks>Adding a new dialog will inherit the <see cref="IBotTelemetryClient"/> of the DialogSet.</remarks>
public DialogSet Add(IDialog dialog)
public DialogSet Add(Dialog dialog)
{
if (dialog == null)
{
@ -125,11 +125,11 @@ namespace Microsoft.Bot.Builder.Dialogs
}
/// <summary>
/// Finds a dialog that was previously added to the set using <see cref="Add(IDialog)"/>.
/// Finds a dialog that was previously added to the set using <see cref="Add(Dialog)"/>.
/// </summary>
/// <param name="dialogId">ID of the dialog/prompt to look up.</param>
/// <returns>The dialog if found, otherwise null.</returns>
public IDialog Find(string dialogId)
public Dialog Find(string dialogId)
{
if (string.IsNullOrWhiteSpace(dialogId))
{
@ -144,7 +144,7 @@ namespace Microsoft.Bot.Builder.Dialogs
return null;
}
public IEnumerable<IDialog> GetDialogs()
public IEnumerable<Dialog> GetDialogs()
{
return _dialogs.Values;
}

Просмотреть файл

@ -1,118 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace Microsoft.Bot.Builder.Dialogs
{
public interface IDialog
{
/// <summary>
/// Gets or sets unique id for the dialog.
/// </summary>
/// <value>
/// Unique id for the dialog.
/// </value>
string Id { get; set; }
/// <summary>
/// Gets tags assigned to the dialog.
/// </summary>
/// <value>
/// Tags assigned to the dialog.
/// </value>
List<string> Tags { get; }
/// <summary>
/// Gets dictionary of memory bindings which are evaluated in a call to `beginDialog()`.
/// </summary>
/// <remarks>Key = property expression to set in this dialog's memory context, Value = property expression of value you want to get from caller's memory context.</remarks>
/// <example>{ "key": "value" } maps to set newDialogState.key = callerDialogState.value.</example>
/// <value>
/// Dictionary of memory bindings which are evaluated in a call to `beginDialog()`.
/// </value>
Dictionary<string, string> InputBindings { get; }
/// <summary>
/// Gets expression in the callers memory to store the result returned via `endDialog()` is called.
/// </summary>
/// <remarks>This the property which the result of EndDialog() for this dialog will be mapped to in the caller's dialog state.</remarks>
/// <example>$foo will be set to EndDialog(result).</example>
/// <value>
/// Expression in the callers memory to store the result returned via `endDialog()` is called.
/// </value>
string OutputBinding { get; }
/// <summary>
/// Gets or sets telemetry client.
/// </summary>
/// <value>
/// Telemetry client.
/// </value>
IBotTelemetryClient TelemetryClient { get; set; }
/// <summary>
/// Method called when a new dialog has been pushed onto the stack and is being activated.
/// </summary>
/// <param name="dc">The dialog context for the current turn of conversation.</param>
/// <param name="options">(Optional) arguments that were passed to the dialog during `begin()` call that started the instance.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
Task<DialogTurnResult> BeginDialogAsync(DialogContext dc, object options = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Method called when an instance of the dialog is the "current" dialog and the
/// user replies with a new activity. The dialog will generally continue to receive the users
/// replies until it calls either `DialogSet.end()` or `DialogSet.begin()`.
/// If this method is NOT implemented then the dialog will automatically be ended when the user replies.
/// </summary>
/// <param name="dc">The dialog context for the current turn of conversation.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
Task<DialogTurnResult> ContinueDialogAsync(DialogContext dc, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Method called when an instance of the dialog is being returned to from another
/// dialog that was started by the current instance using `DialogSet.begin()`.
/// If this method is NOT implemented then the dialog will be automatically ended with a call
/// to `DialogSet.endDialogWithResult()`. Any result passed from the called dialog will be passed
/// to the current dialog's parent.
/// </summary>
/// <param name="dc">The dialog context for the current turn of conversation.</param>
/// <param name="reason">An enum indicating why the dialog resumed.</param>
/// <param name="result">(Optional) value returned from the dialog that was called. The type of the value returned is dependant on the dialog that was called.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
Task<DialogTurnResult> ResumeDialogAsync(DialogContext dc, DialogReason reason, object result = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Trigger the dialog to prompt again.
/// </summary>
/// <param name="turnContext">Dialog turn context.</param>
/// <param name="instance">Dialog instance.</param>
/// <param name="cancellationToken">Cancellation token.</param>
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
Task RepromptDialogAsync(ITurnContext turnContext, DialogInstance instance, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// End the dialog.
/// </summary>
/// <param name="turnContext">Dialog turn context.</param>
/// <param name="instance">Dialog instance.</param>
/// <param name="reason">An enum indicating why the dialog ended.</param>
/// <param name="cancellationToken">Cancellation token.</param>
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
Task EndDialogAsync(ITurnContext turnContext, DialogInstance instance, DialogReason reason, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Called when an event has been raised, using `DialogContext.emitEvent()`, by either the current dialog or a dialog that the current dialog started.
/// </summary>
/// <param name="dc">The dialog context for the current turn of conversation.</param>
/// <param name="e">The event being raised.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>True if the event is handled by the current dialog and bubbling should stop.</returns>
Task<bool> OnDialogEventAsync(DialogContext dc, DialogEvent e, CancellationToken cancellationToken);
}
}

Просмотреть файл

@ -7,6 +7,6 @@ namespace Microsoft.Bot.Builder.Dialogs
{
public interface IDialogDependencies
{
List<IDialog> ListDependencies();
List<Dialog> ListDependencies();
}
}

Просмотреть файл

@ -45,7 +45,7 @@ namespace Microsoft.Bot.Builder.Dialogs
/// ## Prompt Usage
///
/// When used with your bot's <see cref="DialogSet"/> you can simply add a new instance of the prompt as a named
/// dialog using <see cref="DialogSet.Add(IDialog)"/>. You can then start the prompt from a waterfall step using either
/// dialog using <see cref="DialogSet.Add(Dialog)"/>. You can then start the prompt from a waterfall step using either
/// <see cref="DialogContext.BeginDialogAsync(string, object, CancellationToken)"/> or
/// <see cref="DialogContext.PromptAsync(string, PromptOptions, CancellationToken)"/>. The user
/// will be prompted to signin as needed and their access token will be passed as an argument to

Просмотреть файл

@ -19,7 +19,7 @@ namespace Microsoft.Bot.Builder.Dialogs
/// <typeparam name="T">The type of value the prompt returns.</typeparam>
/// <remarks>When the prompt ends, it should return a <typeparamref name="T"/> object that
/// represents the value that was prompted for.
/// Use <see cref="DialogSet.Add(IDialog)"/> or <see cref="ComponentDialog.AddDialog(IDialog)"/>
/// Use <see cref="DialogSet.Add(Dialog)"/> or <see cref="ComponentDialog.AddDialog(Dialog)"/>
/// to add a prompt to a dialog set or component dialog, respectively.
/// Use <see cref="DialogContext.PromptAsync(string, PromptOptions, CancellationToken)"/> or
/// <see cref="DialogContext.BeginDialogAsync(string, object, CancellationToken)"/> to start the prompt.

Просмотреть файл

@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"title": "Microsoft IDialog",
"description": "Union of components which implement the IDialog interface",
"title": "Microsoft Dialog",
"description": "Union of components which implement the Dialog interface",
"$role": "unionType",
"oneOf": [
{

Просмотреть файл

@ -373,7 +373,7 @@
],
"definitions": {
"Microsoft.AdaptiveDialog": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Adaptive Dialog",
"description": "Configures a data driven dialog via a collection of actions/dialogs.",
"type": "object",
@ -556,7 +556,7 @@
]
},
"Microsoft.AttachmentInput": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "AttachmentInput Dialog",
"description": "This represents a dialog which gathers an attachment such as image or music",
"type": "object",
@ -737,7 +737,7 @@
]
},
"Microsoft.BeginDialog": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Begin Dialog",
"description": "Action which begins another dialog (and when that dialog is done, it will return the caller).",
"type": "object",
@ -787,10 +787,10 @@
}
},
"dialog": {
"$type": "Microsoft.IDialog",
"$type": "Microsoft.Dialog",
"title": "Dialog",
"description": "This is the dialog to call.",
"$ref": "#/definitions/Microsoft.IDialog"
"$ref": "#/definitions/Microsoft.Dialog"
},
"options": {
"type": "object",
@ -833,7 +833,7 @@
]
},
"Microsoft.CancelAllDialogs": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Cancel All Dialogs",
"description": "Command to cancel all of the current dialogs by emitting an event which must be caught to prevent cancelation from propagating.",
"type": "object",
@ -916,7 +916,7 @@
]
},
"Microsoft.ChoiceInput": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "ChoiceInput Dialog",
"description": "This represents a dialog which gathers a choice responses",
"type": "object",
@ -1293,7 +1293,7 @@
]
},
"Microsoft.ConfirmInput": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "ConfirmInput Dialog",
"description": "This represents a dialog which gathers a yes/no style responses",
"type": "object",
@ -1725,7 +1725,7 @@
]
},
"Microsoft.DateTimeInput": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "DateTimeInput Dialog",
"description": "This represents a dialog which gathers Date or Time or DateTime from the user",
"type": "object",
@ -1902,7 +1902,7 @@
]
},
"Microsoft.DebugBreak": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Debugger Break Action",
"description": "If debugger is attached, do a debugger break at this point",
"type": "object",
@ -1974,7 +1974,7 @@
]
},
"Microsoft.DeleteProperty": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Delete Property",
"description": "This is a action which allows you to remove a property from memory",
"type": "object",
@ -2105,7 +2105,7 @@
]
},
"Microsoft.EditActions": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "EditActions Action",
"description": "Edit current dialog with changeType and Actions",
"type": "object",
@ -2171,8 +2171,8 @@
"title": "Actions",
"description": "Actions to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -2200,7 +2200,7 @@
]
},
"Microsoft.EditArray": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Edit Array Action",
"description": "This is a action which allows you to modify an array in memory",
"type": "object",
@ -2359,7 +2359,7 @@
]
},
"Microsoft.EmitEvent": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Emit Event Action",
"description": "This is a action which allows you to emit an event",
"type": "object",
@ -2468,7 +2468,7 @@
]
},
"Microsoft.EndDialog": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "End Dialog",
"description": "Command which ends the current dialog, returning the resultProperty as the result of the dialog.",
"type": "object",
@ -2548,7 +2548,7 @@
]
},
"Microsoft.EndTurn": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "End Turn",
"description": "End the current turn without ending the dialog.",
"type": "object",
@ -2770,7 +2770,7 @@
]
},
"Microsoft.Foreach": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Foreach Action",
"description": "Action which executes actions per item in a collection.",
"type": "object",
@ -2833,8 +2833,8 @@
"title": "Actions",
"description": "Actions to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
},
"indexProperty": {
@ -2876,7 +2876,7 @@
]
},
"Microsoft.ForeachPage": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Foreach Page Action",
"description": "Action which execute actions per item page in a collection.",
"type": "object",
@ -2939,8 +2939,8 @@
"title": "Actions",
"description": "Actions to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
},
"pageSize": {
@ -3085,7 +3085,7 @@
]
},
"Microsoft.HttpRequest": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"type": "object",
"title": "Http Request",
"description": "This is a action which replaces the current dialog with the target dialog",
@ -3225,9 +3225,9 @@
}
]
},
"Microsoft.IDialog": {
"title": "Microsoft IDialog",
"description": "Union of components which implement the IDialog interface",
"Microsoft.Dialog": {
"title": "Microsoft Dialog",
"description": "Union of components which implement the Dialog interface",
"$role": "unionType",
"oneOf": [
{
@ -3570,7 +3570,7 @@
]
},
"Microsoft.IfCondition": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "If Condition Action",
"description": "Action which conditionally decides which action to execute next.",
"type": "object",
@ -3633,8 +3633,8 @@
"title": "Actions",
"description": "Action to execute if condition is true.",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
},
"elseActions": {
@ -3642,8 +3642,8 @@
"title": "Else Actions",
"description": "Action to execute if condition is false.",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -3671,7 +3671,7 @@
]
},
"Microsoft.InitProperty": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Init Property Action",
"description": "This action allows you to innitial a property to either an object or array",
"type": "object",
@ -3867,7 +3867,7 @@
]
},
"Microsoft.LogAction": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Log Action",
"description": "This is a action which writes to console.log and optional creates a TraceActivity around a text binding",
"type": "object",
@ -4244,7 +4244,7 @@
]
},
"Microsoft.NumberInput": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "NumberInput Dialog",
"description": "This represents a dialog which gathers a decimal number in a specified range",
"type": "object",
@ -4483,7 +4483,7 @@
]
},
"Microsoft.OAuthInput": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "OAuthInput Dialog",
"description": "This represents a dialog which gathers an OAuth token from user",
"type": "object",
@ -4717,8 +4717,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
},
"type": {
@ -4793,8 +4793,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -4863,8 +4863,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -4933,8 +4933,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
},
"events": {
@ -5023,8 +5023,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -5093,8 +5093,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -5163,8 +5163,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -5233,8 +5233,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -5303,8 +5303,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
},
"intent": {
@ -5387,8 +5387,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -5457,8 +5457,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -5527,8 +5527,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -5597,8 +5597,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -5667,8 +5667,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -5737,8 +5737,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -5807,8 +5807,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -5992,7 +5992,7 @@
]
},
"Microsoft.QnAMakerDialog": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "QnAMaker Dialog",
"description": "This represents a dialog which is driven by a call to QnAMaker.ai knowledge base",
"type": "object",
@ -6287,7 +6287,7 @@
]
},
"Microsoft.RepeatDialog": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"type": "object",
"title": "Repeat Dialog",
"description": "This is a action which repeats the current dialog with the same dialog.",
@ -6359,7 +6359,7 @@
]
},
"Microsoft.ReplaceDialog": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"type": "object",
"title": "Replace Dialog",
"description": "This is a action which replaces the current dialog with the target dialog",
@ -6409,10 +6409,10 @@
}
},
"dialog": {
"$type": "Microsoft.IDialog",
"$type": "Microsoft.Dialog",
"title": "Dialog",
"description": "This is the dialog to switch to.",
"$ref": "#/definitions/Microsoft.IDialog"
"$ref": "#/definitions/Microsoft.Dialog"
},
"options": {
"type": "object",
@ -6454,7 +6454,7 @@
]
},
"Microsoft.SendActivity": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Send Activity Action",
"description": "This is a action which sends an activity to the user",
"type": "object",
@ -6532,7 +6532,7 @@
]
},
"Microsoft.SetProperty": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Set Property Action",
"description": "This action allows you to set memory to the value of an expression",
"type": "object",
@ -6624,7 +6624,7 @@
]
},
"Microsoft.SwitchCondition": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Switch Action",
"description": "Action which conditionally decides which action to execute next.",
"type": "object",
@ -6704,8 +6704,8 @@
"title": "Actions",
"description": "Actions to execute if case is equal to condition",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
}
@ -6716,8 +6716,8 @@
"title": "Default",
"description": "Action to execute if no case is equal to condition",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -6796,7 +6796,7 @@
]
},
"Microsoft.TextInput": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "TextInput Dialog",
"description": "This represents a dialog which gathers a text from the user",
"type": "object",
@ -6979,7 +6979,7 @@
]
},
"Microsoft.TraceActivity": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Trace Activity Action",
"description": "This is a action which sends an TraceActivity to the transcript",
"type": "object",

Просмотреть файл

@ -1367,14 +1367,14 @@ namespace Microsoft.Bot.Builder.AI.QnA.Tests
{
new OnIntent(intent: "CowboyIntent")
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("Yippee ki-yay!")
}
},
new OnUnknownIntent()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new QnAMakerDialog(qnamaker: qna)
{
@ -1383,7 +1383,7 @@ namespace Microsoft.Bot.Builder.AI.QnA.Tests
new IfCondition()
{
Condition = "turn.LastResult == false",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("I didn't understand that.")
}
@ -1399,7 +1399,7 @@ namespace Microsoft.Bot.Builder.AI.QnA.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new BeginDialog(outerDialog.Id)
}
@ -1407,7 +1407,7 @@ namespace Microsoft.Bot.Builder.AI.QnA.Tests
new Dialogs.Adaptive.Events.OnDialogEvent()
{
Events = new List<string>() { "UnhandledUnknownIntent" },
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new EditArray(),
new SendActivity("magenta")

Просмотреть файл

@ -31,7 +31,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
testDialog.AddEvents(new List<IOnEvent>()
{
new OnUnknownIntent(
new List<IDialog>()
new List<Dialog>()
{
new TextInput() { Prompt = new ActivityTemplate("Hello, what is your name?"), OutputBinding = "user.name" },
new SendActivity("Hello {user.name}, nice to meet you!"),
@ -55,7 +55,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
testDialog.AddRules(new List<IRule>()
{
new UnknownIntentRule(
new List<IDialog>()
new List<Dialog>()
{
new HttpRequest()
{
@ -90,7 +90,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
dialog.AddEvents(new List<IOnEvent>()
{
new OnUnknownIntent(
new List<IDialog>()
new List<Dialog>()
{
new SetProperty()
{
@ -137,12 +137,12 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
testDialog.AddEvents(new List<IOnEvent>()
{
new OnUnknownIntent(
new List<IDialog>()
new List<Dialog>()
{
new IfCondition()
{
Condition = "!dialog.foo && user.name == null",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new TextInput()
{
@ -151,7 +151,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
},
new SendActivity("Hello {user.name}, nice to meet you!")
},
ElseActions = new List<IDialog>()
ElseActions = new List<Dialog>()
{
new SendActivity("Hello {user.name}, nice to see you again!")
}
@ -178,7 +178,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SetProperty()
{
@ -190,11 +190,11 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
Condition = "user.name",
Cases = new List<Case>()
{
new Case("susan", new List<IDialog>() { new SendActivity("hi susan") }),
new Case("bob", new List<IDialog>() { new SendActivity("hi bob") }),
new Case("frank", new List<IDialog>() { new SendActivity("hi frank") })
new Case("susan", new List<Dialog>() { new SendActivity("hi susan") }),
new Case("bob", new List<Dialog>() { new SendActivity("hi bob") }),
new Case("frank", new List<Dialog>() { new SendActivity("hi frank") })
},
Default = new List<IDialog>() { new SendActivity("Who are you?") }
Default = new List<Dialog>() { new SendActivity("Who are you?") }
},
}
}
@ -216,7 +216,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SetProperty()
{
@ -228,11 +228,11 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
Condition = "user.name",
Cases = new List<Case>()
{
new Case("susan", new List<IDialog>() { new SendActivity("hi susan") }),
new Case("bob", new List<IDialog>() { new SendActivity("hi bob") }),
new Case("frank", new List<IDialog>() { new SendActivity("hi frank") })
new Case("susan", new List<Dialog>() { new SendActivity("hi susan") }),
new Case("bob", new List<Dialog>() { new SendActivity("hi bob") }),
new Case("frank", new List<Dialog>() { new SendActivity("hi frank") })
},
Default = new List<IDialog>() { new SendActivity("Who are you?") }
Default = new List<Dialog>() { new SendActivity("Who are you?") }
},
}
}
@ -254,7 +254,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SetProperty()
{
@ -266,11 +266,11 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
Condition = "user.age",
Cases = new List<Case>()
{
new Case("21", new List<IDialog>() { new SendActivity("Age is 21") }),
new Case("22", new List<IDialog>() { new SendActivity("Age is 22") }),
new Case("23", new List<IDialog>() { new SendActivity("Age is 23") })
new Case("21", new List<Dialog>() { new SendActivity("Age is 21") }),
new Case("22", new List<Dialog>() { new SendActivity("Age is 22") }),
new Case("23", new List<Dialog>() { new SendActivity("Age is 23") })
},
Default = new List<IDialog>() { new SendActivity("Who are you?") }
Default = new List<Dialog>() { new SendActivity("Who are you?") }
},
}
}
@ -292,7 +292,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SetProperty()
{
@ -304,10 +304,10 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
Condition = "user.isVip",
Cases = new List<Case>()
{
new Case("True", new List<IDialog>() { new SendActivity("User is VIP") }),
new Case("False", new List<IDialog>() { new SendActivity("User is NOT VIP") })
new Case("True", new List<Dialog>() { new SendActivity("User is VIP") }),
new Case("False", new List<Dialog>() { new SendActivity("User is NOT VIP") })
},
Default = new List<IDialog>() { new SendActivity("Who are you?") }
Default = new List<Dialog>() { new SendActivity("Who are you?") }
},
}
}
@ -328,12 +328,12 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
testDialog.AddEvents(new List<IOnEvent>()
{
new OnUnknownIntent(
new List<IDialog>()
new List<Dialog>()
{
new IfCondition()
{
Condition = "user.name == null",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new TextInput()
{
@ -370,7 +370,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnUnknownIntent()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new NumberInput()
{
@ -402,7 +402,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new ConfirmInput()
{
@ -455,7 +455,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new ChoiceInput()
{
@ -514,7 +514,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new ChoiceInput()
{
@ -573,7 +573,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SetProperty()
{
@ -637,7 +637,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SetProperty()
{
@ -702,7 +702,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
testDialog.AddEvents(new List<IOnEvent>()
{
new OnUnknownIntent(
new List<IDialog>()
new List<Dialog>()
{
new NumberInput()
{
@ -742,7 +742,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
testDialog.AddEvents(new List<IOnEvent>()
{
new OnUnknownIntent(
new List<IDialog>()
new List<Dialog>()
{
new DateTimeInput()
{
@ -770,12 +770,12 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
testDialog.AddEvents(new List<IOnEvent>()
{
new OnUnknownIntent(
new List<IDialog>()
new List<Dialog>()
{
new IfCondition()
{
Condition = "user.name == null",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new TextInput()
{
@ -822,7 +822,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnUnknownIntent()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new TextInput()
{
@ -836,13 +836,13 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "Replace",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("I'm going to replace the original actions via EditActions"),
new EditActions()
{
ChangeType = ActionChangeType.ReplaceSequence,
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("New actions..."),
new TextInput()
@ -885,7 +885,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new EndTurn(),
new SendActivity("One") { Tags = { "a" } },
@ -895,14 +895,14 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "Insert",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("Inserted"),
new EditActions()
{
ChangeType = ActionChangeType.InsertActionsBeforeTags,
Tags = { "c" },
Actions = new List<IDialog>() { new SendActivity("Two") }
Actions = new List<Dialog>() { new SendActivity("Two") }
}
}
}
@ -930,19 +930,19 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnIntent(
"JokeIntent",
actions: new List<IDialog>()
actions: new List<Dialog>()
{
new SendActivity("Why did the chicken cross the road?"),
new EndTurn(),
new SendActivity("To get to the other side")
}),
new OnUnknownIntent(
new List<IDialog>()
new List<Dialog>()
{
new IfCondition()
{
Condition = "user.name == null",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new TextInput()
{
@ -978,7 +978,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnUnknownIntent()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("Why did the chicken cross the road?"),
new EndTurn(),
@ -994,12 +994,12 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new IfCondition()
{
Condition = "user.name == null",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new TextInput()
{
@ -1023,7 +1023,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("I'm a joke bot. To get started say 'tell me a joke'"),
new BeginDialog(askNameDialog.Id)
@ -1031,12 +1031,12 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
},
new OnIntent(
"JokeIntent",
actions: new List<IDialog>()
actions: new List<Dialog>()
{
new BeginDialog() { Dialog = tellJokeDialog }
}),
new OnUnknownIntent(
actions: new List<IDialog>()
actions: new List<Dialog>()
{
new SendActivity("I'm a joke bot. To get started say 'tell me a joke'")
}),
@ -1061,7 +1061,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
tellJokeDialog.AddEvents(new List<IOnEvent>()
{
new OnUnknownIntent(
new List<IDialog>()
new List<Dialog>()
{
new SendActivity("Why did the chicken cross the road?"),
new EndTurn(),
@ -1075,12 +1075,12 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new IfCondition()
{
Condition = "user.name == null",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new TextInput()
{
@ -1103,7 +1103,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
testDialog.AddEvent(new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("I'm a joke bot. To get started say 'tell me a joke'"),
new ReplaceDialog("AskNameDialog")
@ -1114,13 +1114,13 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnIntent(
"JokeIntent",
actions: new List<IDialog>()
actions: new List<Dialog>()
{
new ReplaceDialog("TellJokeDialog")
}),
});
testDialog.AddDialogs(new List<IDialog>()
testDialog.AddDialogs(new List<Dialog>()
{
tellJokeDialog,
askNameDialog
@ -1151,12 +1151,12 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnIntent(
"EndIntent",
actions: new List<IDialog>()
actions: new List<Dialog>()
{
new EndDialog()
}),
new OnUnknownIntent(
new List<IDialog>()
new List<Dialog>()
{
new SendActivity("Why did the chicken cross the road?"),
new EndTurn(),
@ -1168,7 +1168,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
testDialog.AddEvents(new List<IOnEvent>()
{
new OnUnknownIntent(
new List<IDialog>()
new List<Dialog>()
{
new BeginDialog(tellJokeDialog.Id),
new SendActivity("You went out from ask name dialog.")
@ -1194,7 +1194,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new TextInput() { Prompt = new ActivityTemplate("Hello, what is your name?"), OutputBinding = "user.name", Value = "user.name" },
new SendActivity("Hello {user.name}, nice to meet you!"),
@ -1236,14 +1236,14 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnIntent(intent: "CowboyIntent")
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("Yippee ki-yay!")
}
},
new OnIntent(intent: "EmitIntent")
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new EmitEvent()
{
@ -1261,7 +1261,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new BeginDialog(outer.Id)
}
@ -1270,7 +1270,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnDialogEvent()
{
Events = new List<string>() { "CustomEvent" },
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("CustomEventFired")
}
@ -1301,7 +1301,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new InitProperty()
{
@ -1333,7 +1333,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new Foreach()
{
ListProperty = "dialog.todo",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("index is: {dialog.index} and value is: {dialog.value}")
}
@ -1363,7 +1363,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new InitProperty()
{
@ -1418,13 +1418,13 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
ListProperty = "dialog.todo",
PageSize = 3,
ValueProperty = "dialog.page",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("This page have 3 items"),
new Foreach()
{
ListProperty = "dialog.page",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("index is: {dialog.index} and value is: {dialog.value}")
}

Просмотреть файл

@ -33,7 +33,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
var ruleDialog = new AdaptiveDialog("planningTest");
ruleDialog.AddEvent(new OnUnknownIntent(
new List<IDialog>()
new List<Dialog>()
{
new SendActivity("Hello Planning!")
}));
@ -49,7 +49,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
var ruleDialog = new AdaptiveDialog("planningTest");
ruleDialog.AddEvent(new OnUnknownIntent(new List<IDialog>()
ruleDialog.AddEvent(new OnUnknownIntent(new List<Dialog>()
{
new SendActivity("Hello Planning!"),
new SendActivity("Howdy awain")
@ -69,7 +69,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
ruleDialog.AddEvent(
new OnUnknownIntent(
new List<IDialog>()
new List<Dialog>()
{
new TextInput()
{
@ -93,7 +93,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
var dialog = new AdaptiveDialog("planningTest");
dialog.Events.Add(new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
// Add item
new TextInput()
@ -181,12 +181,12 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
var ruleDialog = new AdaptiveDialog("planningTest");
ruleDialog.AddEvent(new OnUnknownIntent(
new List<IDialog>()
new List<Dialog>()
{
new IfCondition()
{
Condition = "user.name == null",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new TextInput()
{
@ -215,12 +215,12 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new IfCondition()
{
Condition = "user.name == null",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new TextInput()
{
@ -254,12 +254,12 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnUnknownIntent()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new IfCondition()
{
Condition = "user.name == null",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new TextInput()
{
@ -272,7 +272,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
// Check comparison with string literal
Condition = "user.name == 'Carlos'",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("Hello carlin")
}
@ -302,7 +302,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new NumberInput()
{
@ -341,7 +341,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new NumberInput()
{
@ -389,12 +389,12 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new IfCondition()
{
Condition = "user.name == null",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new TextInput()
{
@ -409,7 +409,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "JokeIntent",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("Why did the chicken cross the road?"),
new EndTurn(),
@ -419,7 +419,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "HelloIntent",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("Hello {user.name}, nice to meet you!")
}
@ -459,12 +459,12 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new IfCondition()
{
Condition = "user.name == null",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new TextInput()
{
@ -479,21 +479,21 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "GreetingIntent",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("Hello {user.name}, nice to meet you!")
}
},
new OnIntent(
"JokeIntent",
actions: new List<IDialog>()
actions: new List<Dialog>()
{
new SendActivity("Why did the chicken cross the road?"),
new EndTurn(),
new SendActivity("To get to the other side")
}),
new OnUnknownIntent(
actions: new List<IDialog>()
actions: new List<Dialog>()
{
new SendActivity("I'm a joke bot. To get started say 'tell me a joke'")
})
@ -532,12 +532,12 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new IfCondition()
{
Condition = "user.name == null",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new TextInput()
{
@ -551,13 +551,13 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
},
new OnIntent(
"GreetingIntemt",
actions: new List<IDialog>()
actions: new List<Dialog>()
{
new SendActivity("Hello {user.name}, nice to meet you!"),
}),
new OnIntent(
"JokeIntent",
actions: new List<IDialog>()
actions: new List<Dialog>()
{
new SendActivity("Why did the chicken cross the road?"),
new EndTurn(),
@ -565,13 +565,13 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
}),
new OnIntent(
"GoodbyeIntent",
actions: new List<IDialog>()
actions: new List<Dialog>()
{
new SendActivity("See you later aligator!"),
new EndDialog()
}),
new OnUnknownIntent(
new List<IDialog>()
new List<Dialog>()
{
new SendActivity("I'm a joke bot. To get started say 'tell me a joke'")
})
@ -615,7 +615,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new BeginDialog("Greeting"),
new SendActivity("I'm a joke bot. To get started say 'tell me a joke'"),
@ -624,27 +624,27 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent(
"JokeIntent",
actions: new List<IDialog>()
actions: new List<Dialog>()
{
new BeginDialog("TellJokeDialog"),
}),
new OnIntent(
"GreetingIntent",
actions: new List<IDialog>()
actions: new List<Dialog>()
{
new BeginDialog("Greeting"),
}),
new OnIntent(
"GoodbyeIntent",
actions: new List<IDialog>()
actions: new List<Dialog>()
{
new SendActivity("See you later aligator!"),
new EndDialog()
}),
new OnUnknownIntent(actions: new List<IDialog>()
new OnUnknownIntent(actions: new List<Dialog>()
{
new SendActivity("Like I said, I'm a joke bot. To get started say 'tell me a joke'"),
}),
@ -659,12 +659,12 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new IfCondition()
{
Condition = "user.name == null",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new TextInput()
{
@ -673,7 +673,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
},
new SendActivity("Hello {user.name}, nice to meet you!")
},
ElseActions = new List<IDialog>()
ElseActions = new List<Dialog>()
{
new SendActivity("Hello {user.name}, nice to see you again!")
}
@ -688,7 +688,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("Why did the chicken cross the road?"),
new EndTurn(),
@ -714,35 +714,35 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("Hi, type 'begin' to start a dialog, type 'help' to get help.")
},
},
new OnIntent("BeginIntent")
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new BeginDialog("innerDialog")
}
},
new OnIntent("HelpIntent")
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("help is coming")
}
},
new OnUnknownIntent()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("Hi, type 'begin' to start a dialog, type 'help' to get help.")
}
},
}
};
outerDialog.AddDialogs(new List<IDialog>() { innerDialog });
outerDialog.AddDialogs(new List<Dialog>() { innerDialog });
await CreateFlow(outerDialog)
.Send("hi")
@ -789,7 +789,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new TextInput()
{
@ -813,9 +813,9 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new SendActivity("{user.age}")
}
},
new OnIntent("SideIntent") { Actions = new List<IDialog>() { new SendActivity("sideintent") } },
new OnIntent("CancelIntent") { Actions = new List<IDialog>() { new EndDialog() } },
new OnUnknownIntent() { Actions = new List<IDialog>() { new SendActivity("outerWhat") } }
new OnIntent("SideIntent") { Actions = new List<Dialog>() { new SendActivity("sideintent") } },
new OnIntent("CancelIntent") { Actions = new List<Dialog>() { new EndDialog() } },
new OnUnknownIntent() { Actions = new List<Dialog>() { new SendActivity("outerWhat") } }
}
};
@ -832,9 +832,9 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
},
Events = new List<IOnEvent>()
{
new OnIntent("StartOuterIntent", actions: new List<IDialog>() { outerDialog }),
new OnIntent("RootIntent", actions: new List<IDialog>() { new SendActivity("rootintent") }),
new OnUnknownIntent(new List<IDialog>() { new SendActivity("rootunknown") })
new OnIntent("StartOuterIntent", actions: new List<Dialog>() { outerDialog }),
new OnIntent("RootIntent", actions: new List<Dialog>() { new SendActivity("rootintent") }),
new OnUnknownIntent(new List<Dialog>() { new SendActivity("rootunknown") })
}
};
@ -880,18 +880,18 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
},
Events = new List<IOnEvent>()
{
new OnActivity("Custom", actions: new List<IDialog>() { new SendActivity("CustomActivityEvent") }),
new OnMessageActivity(actions: new List<IDialog>() { new SendActivity("MessageActivityEvent") }),
new OnMessageDeleteActivity(actions: new List<IDialog>() { new SendActivity("MessageDeleteActivityEvent") }),
new OnMessageUpdateActivity(actions: new List<IDialog>() { new SendActivity("MessageUpdateActivityEvent") }),
new OnMessageReactionActivity(actions: new List<IDialog>() { new SendActivity("MessageReactionActivityEvent") }),
new OnConversationUpdateActivity(actions: new List<IDialog>() { new SendActivity("ConversationUpdateActivityEvent") }),
new OnEndOfConversationActivity(actions: new List<IDialog>() { new SendActivity("EndOfConversationActivityEvent") }),
new OnInvokeActivity(actions: new List<IDialog>() { new SendActivity("InvokeActivityEvent") }),
new OnEventActivity(actions: new List<IDialog>() { new SendActivity("EventActivityEvent") }),
new OnHandoffActivity(actions: new List<IDialog>() { new SendActivity("HandoffActivityEvent") }),
new OnTypingActivity(actions: new List<IDialog>() { new SendActivity("TypingActivityEvent") }),
new OnMessageActivity(constraint: "turn.activity.text == 'constraint'", actions: new List<IDialog>() { new SendActivity("constraint") }),
new OnActivity("Custom", actions: new List<Dialog>() { new SendActivity("CustomActivityEvent") }),
new OnMessageActivity(actions: new List<Dialog>() { new SendActivity("MessageActivityEvent") }),
new OnMessageDeleteActivity(actions: new List<Dialog>() { new SendActivity("MessageDeleteActivityEvent") }),
new OnMessageUpdateActivity(actions: new List<Dialog>() { new SendActivity("MessageUpdateActivityEvent") }),
new OnMessageReactionActivity(actions: new List<Dialog>() { new SendActivity("MessageReactionActivityEvent") }),
new OnConversationUpdateActivity(actions: new List<Dialog>() { new SendActivity("ConversationUpdateActivityEvent") }),
new OnEndOfConversationActivity(actions: new List<Dialog>() { new SendActivity("EndOfConversationActivityEvent") }),
new OnInvokeActivity(actions: new List<Dialog>() { new SendActivity("InvokeActivityEvent") }),
new OnEventActivity(actions: new List<Dialog>() { new SendActivity("EventActivityEvent") }),
new OnHandoffActivity(actions: new List<Dialog>() { new SendActivity("HandoffActivityEvent") }),
new OnTypingActivity(actions: new List<Dialog>() { new SendActivity("TypingActivityEvent") }),
new OnMessageActivity(constraint: "turn.activity.text == 'constraint'", actions: new List<Dialog>() { new SendActivity("constraint") }),
}
};
@ -938,8 +938,8 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
},
Events = new List<IOnEvent>()
{
new OnIntent(intent: "JokeIntent", actions: new List<IDialog>() { new SendActivity("chicken joke") }),
new OnMessageActivity(constraint: "turn.activity.text == 'magic'", actions: new List<IDialog>() { new SendActivity("abracadabra") }),
new OnIntent(intent: "JokeIntent", actions: new List<Dialog>() { new SendActivity("chicken joke") }),
new OnMessageActivity(constraint: "turn.activity.text == 'magic'", actions: new List<Dialog>() { new SendActivity("abracadabra") }),
}
};
@ -961,7 +961,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnUnknownIntent()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new NumberInput()
{
@ -995,7 +995,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnUnknownIntent()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new NumberInput()
{
@ -1005,11 +1005,11 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new IfCondition()
{
Condition = "$age > 80",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("Thanks, you are quite young!")
},
ElseActions = new List<IDialog>()
ElseActions = new List<Dialog>()
{
new SendActivity("Thanks, you are awesome!")
}
@ -1036,7 +1036,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnUnknownIntent()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new NumberInput()
{
@ -1061,7 +1061,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnUnknownIntent()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("Hello, you are {dialog.options.userAge} years old!"),
new SendActivity("And your actual age is {$options.userAge}")
@ -1091,7 +1091,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnUnknownIntent()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new TextInput()
{
@ -1168,7 +1168,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnUnknownIntent()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("Hello, I'm the demo bot.")
}
@ -1176,7 +1176,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "reset",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new DeleteProperty()
{
@ -1188,7 +1188,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "Start",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new TextInput()
{
@ -1202,7 +1202,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "Interruption",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
// short circuiting Interruption so consultation is terminated.
new SendActivity("In Interruption..."),
@ -1218,7 +1218,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "Greeting",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("Hi, I'm the test bot!")
}
@ -1226,7 +1226,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "noage",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("Sure, no problem. I'll set your name to 'Human'. you can say reset to start over"),
new SetProperty()
@ -1239,7 +1239,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "why",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("I need your name to be able to address you correctly")
}
@ -1284,7 +1284,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "Start",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new TextInput()
{
@ -1298,7 +1298,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "Interruption",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
// short circuiting Interruption so consultation is terminated.
new SendActivity("In Interruption..."),
@ -1342,7 +1342,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "Start",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new TextInput()
{
@ -1363,7 +1363,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "Interruption",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
// short circuiting Interruption so consultation is terminated.
new SendActivity("In Interruption..."),
@ -1379,7 +1379,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "None",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("You said {turn.activity.text}"),
new SetProperty()
@ -1424,7 +1424,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "Start",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new NumberInput()
{
@ -1444,7 +1444,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "None",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
// short circuiting Interruption so consultation is terminated.
new SendActivity("In None..."),
@ -1493,7 +1493,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "Start",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new NumberInput()
{
@ -1513,7 +1513,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "None",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
// short circuiting Interruption so consultation is terminated.
new SendActivity("In None..."),
@ -1559,7 +1559,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "Start",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new NumberInput()
{
@ -1574,7 +1574,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "None",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
// short circuiting Interruption so consultation is terminated.
new SendActivity("In None..."),
@ -1623,7 +1623,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "Start",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new NumberInput()
{
@ -1638,7 +1638,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "None",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
// short circuiting Interruption so consultation is terminated.
new SendActivity("In None..."),
@ -1686,7 +1686,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "Start",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new NumberInput()
{
@ -1700,7 +1700,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "None",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
// short circuiting Interruption so consultation is terminated.
new SendActivity("In None..."),
@ -1746,7 +1746,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "Start",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new NumberInput()
{
@ -1761,7 +1761,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "None",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
// short circuiting Interruption so consultation is terminated.
new SendActivity("In None..."),
@ -1807,7 +1807,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "Start",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new NumberInput()
{
@ -1827,7 +1827,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "None",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
// short circuiting Interruption so consultation is terminated.
new SendActivity("In None..."),
@ -1874,7 +1874,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "Start",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new NumberInput()
{
@ -1890,7 +1890,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent()
{
Intent = "None",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
// short circuiting Interruption so consultation is terminated.
new SendActivity("In None..."),
@ -1924,7 +1924,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnUnknownIntent()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new TextInput()
{
@ -1948,7 +1948,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnUnknownIntent()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new NumberInput()
{
@ -1993,7 +1993,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnIntent(intent: "SubmitIntent")
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("The city is {@city}!")
}

Просмотреть файл

@ -218,14 +218,14 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("{turn.activity.text}"),
}
},
new OnIntent(
intent: "IntentNumber1",
actions: new List<IDialog>()
actions: new List<Dialog>()
{
new SendActivity("{turn.activity.text}"),
new SendActivity("{turn.recognized.intent}"),
@ -235,7 +235,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
}),
new OnIntent(
intent: "NameIntent",
actions: new List<IDialog>()
actions: new List<Dialog>()
{
new SendActivity("{turn.recognized.entities.name[0]}"),
}),
@ -266,7 +266,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SetProperty()
{
@ -277,7 +277,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new IfCondition()
{
Condition = "dialog.name == 'testDialog'",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("nested dialogCommand {dialog.name}")
}
@ -304,7 +304,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("nested d2 {$name}"),
new SetProperty() { Property = "dialog.name", Value = "'testDialogd2'" },
@ -322,7 +322,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SetProperty() { Property = "dialog.name", Value = "'testDialog'" },
new SendActivity("{dialog.name}"),
@ -334,7 +334,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("nested d1 {$name}"),
new SetProperty() { Property = "dialog.name", Value = "'testDialogd1'" },
@ -375,7 +375,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("nested begindialog {$zzz}"),
new SetProperty() { Property = "dialog.zzz", Value = "'newName2'" },
@ -392,7 +392,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("nested begindialog2 {$qqq}"),
new SetProperty() { Property = "dialog.qqq", Value = "'newName3'" },
@ -409,7 +409,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SetProperty() { Property = "dialog.name", Value = "'testDialog'" },
new SendActivity("{dialog.name}"),
@ -422,7 +422,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("nested dialogCommand {$xxx}"),
new SetProperty() { Property = "dialog.xxx", Value = "'newName'" },
@ -471,7 +471,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SetProperty() { Property = "$zzz", Value = "'zzz'" },
new SetProperty() { Property = "$aaa", Value = "'d3'" },
@ -490,7 +490,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SetProperty() { Property = "$bbb", Value = "'bbb'" },
new SendActivity("{$aaa}"),
@ -510,7 +510,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SetProperty() { Property = "dialog.xyz", Value = "'xyz'" },
new SetProperty() { Property = "$aaa", Value = "'d1'" },

Просмотреть файл

@ -39,14 +39,14 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("I'm a joke bot. To get started say 'tell me a joke'")
},
},
new OnIntent(
"JokeIntent",
actions: new List<IDialog>()
actions: new List<Dialog>()
{
new SendActivity("Why did the chicken cross the road?"),
new EndTurn(),
@ -83,8 +83,8 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new OnIntent(
intent: "addColor",
entities: new List<string>() { "color" },
actions: new List<IDialog>() { new SendActivity("You picked {@color}") }),
new OnUnknownIntent(actions: new List<IDialog>() { new SendActivity("pbtpbtpbt!") })
actions: new List<Dialog>() { new SendActivity("You picked {@color}") }),
new OnUnknownIntent(actions: new List<Dialog>() { new SendActivity("pbtpbtpbt!") })
}
};

Просмотреть файл

@ -30,7 +30,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new TextInput()
{
@ -42,7 +42,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
},
new OnIntent("CancelIntent")
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new ConfirmInput()
{
@ -52,12 +52,12 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
new IfCondition()
{
Condition = "conversation.addTodo.cancelConfirmation == true",
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("canceling"),
new EndDialog()
},
ElseActions = new List<IDialog>()
ElseActions = new List<Dialog>()
{
new SendActivity("notcanceling")
}
@ -105,7 +105,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new TextInput() { Prompt = new ActivityTemplate("Hello, what is your name?"), OutputBinding = "user.name", AllowInterruptions = AllowInterruptions.Always, Value = "user.name" },
new SendActivity("Hello {user.name}, nice to meet you!"),
@ -116,7 +116,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
},
new OnIntent("SetName", new List<string>() { "name" })
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SetProperty()
{

Просмотреть файл

@ -162,17 +162,17 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Recognizers.Tests
dialog.AddEvents(new List<IOnEvent>()
{
new OnIntent("Greeting", actions:
new List<IDialog>()
new List<Dialog>()
{
new SendActivity("greeting intent"),
}),
new OnIntent("Goodbye", actions:
new List<IDialog>()
new List<Dialog>()
{
new SendActivity("goodbye intent"),
}),
new OnUnknownIntent(actions:
new List<IDialog>()
new List<Dialog>()
{
new SendActivity("default rule"),
}),

Просмотреть файл

@ -99,14 +99,14 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
};
dialog.AddEvents(new List<IOnEvent>()
{
new OnIntent("a", actions: new List<IDialog> { new SetProperty { Property = "user.a", Value = "1" } }),
new OnIntent("b", actions: new List<IDialog> { new SetProperty { Property = "user.b", Value = "1" } }),
new OnIntent("trigger", constraint: "user.a == 1", actions: new List<IDialog> { new SendActivity("ruleA1") }),
new OnIntent("trigger", constraint: "user.a == 1", actions: new List<IDialog> { new SendActivity("ruleA2") }),
new OnIntent("trigger", constraint: "user.b == 1 || user.c == 1", actions: new List<IDialog> { new SendActivity("ruleBorC") }),
new OnIntent("trigger", constraint: "user.a == 1 && user.b == 1", actions: new List<IDialog> { new SendActivity("ruleAandB") }),
new OnIntent("trigger", constraint: "user.a == 1 && user.c == 1", actions: new List<IDialog> { new SendActivity("ruleAandC") }),
new OnIntent("trigger", constraint: string.Empty, actions: new List<IDialog> { new SendActivity("default") })
new OnIntent("a", actions: new List<Dialog> { new SetProperty { Property = "user.a", Value = "1" } }),
new OnIntent("b", actions: new List<Dialog> { new SetProperty { Property = "user.b", Value = "1" } }),
new OnIntent("trigger", constraint: "user.a == 1", actions: new List<Dialog> { new SendActivity("ruleA1") }),
new OnIntent("trigger", constraint: "user.a == 1", actions: new List<Dialog> { new SendActivity("ruleA2") }),
new OnIntent("trigger", constraint: "user.b == 1 || user.c == 1", actions: new List<Dialog> { new SendActivity("ruleBorC") }),
new OnIntent("trigger", constraint: "user.a == 1 && user.b == 1", actions: new List<Dialog> { new SendActivity("ruleAandB") }),
new OnIntent("trigger", constraint: "user.a == 1 && user.c == 1", actions: new List<Dialog> { new SendActivity("ruleAandC") }),
new OnIntent("trigger", constraint: string.Empty, actions: new List<Dialog> { new SendActivity("default") })
});
dialog.AutoEndDialog = false;

Просмотреть файл

@ -48,7 +48,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
dialog.AddEvents(new List<IOnEvent>()
{
new OnUnknownIntent(actions:
new List<IDialog>()
new List<Dialog>()
{
new SendActivity()
{

Просмотреть файл

@ -314,7 +314,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Loader.Tests
throw new Exception($"Resource[{resourceName}] not found");
}
var dialog = DeclarativeTypeLoader.Load<IDialog>(resource, resourceExplorer, DebugSupport.SourceRegistry);
var dialog = DeclarativeTypeLoader.Load<Dialog>(resource, resourceExplorer, DebugSupport.SourceRegistry);
DialogManager dm = new DialogManager(dialog);
return new TestFlow(adapter, async (turnContext, cancellationToken) =>

Просмотреть файл

@ -119,7 +119,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Tests
adaptiveDialog.AddEvent(
new OnUnknownIntent(
new List<IDialog>()
new List<Dialog>()
{
new TextInput()
{
@ -132,7 +132,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Tests
return adaptiveDialog;
}
private TestFlow CreateFlow(IDialog adaptiveDialog, IStorage storage, string conversationId)
private TestFlow CreateFlow(Dialog adaptiveDialog, IStorage storage, string conversationId)
{
TypeFactory.Configuration = new ConfigurationBuilder().Build();

Просмотреть файл

@ -130,7 +130,7 @@ namespace Microsoft.Bot.Builder.AI.LanguageGeneration.Tests
{
new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
new SendActivity("[test]")
}
@ -154,7 +154,7 @@ namespace Microsoft.Bot.Builder.AI.LanguageGeneration.Tests
await CreateFlow("en-us", async (turnContext, cancellationToken) =>
{
var resource = resourceExplorer.GetResource("test.dialog");
var dialog = (AdaptiveDialog)DeclarativeTypeLoader.Load<IDialog>(resource, resourceExplorer, DebugSupport.SourceRegistry);
var dialog = (AdaptiveDialog)DeclarativeTypeLoader.Load<Dialog>(resource, resourceExplorer, DebugSupport.SourceRegistry);
DialogManager dm = new DialogManager(dialog);
await dm.OnTurnAsync(turnContext, cancellationToken: cancellationToken).ConfigureAwait(false);
})

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Javascript Action",
"description": "This gives you the ability to execute javascript to manipulate memory",
"type": "object",

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/botbuilder-dotnet/4.Future/schemas/component.schema",
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Multiply",
"description": "This will return the result of arg1*arg2",
"type": "object",

Просмотреть файл

@ -80,8 +80,8 @@ namespace Microsoft.Bot.Builder.TestBot.Json
{
var name = Path.GetFileNameWithoutExtension(Path.GetFileNameWithoutExtension(resource.Id));
choiceInput.Choices.Add(new Choice(name));
var dialog = DeclarativeTypeLoader.Load<IDialog>(resource, this.resourceExplorer, DebugSupport.SourceRegistry);
handleChoice.Cases.Add(new Case($"{name}", new List<IDialog>() { dialog }));
var dialog = DeclarativeTypeLoader.Load<Dialog>(resource, this.resourceExplorer, DebugSupport.SourceRegistry);
handleChoice.Cases.Add(new Case($"{name}", new List<Dialog>() { dialog }));
}
catch (SyntaxErrorException err)
{
@ -96,7 +96,7 @@ namespace Microsoft.Bot.Builder.TestBot.Json
choiceInput.Style = ListStyle.Auto;
rootDialog.Events.Add(new OnBeginDialog()
{
Actions = new List<IDialog>()
Actions = new List<Dialog>()
{
choiceInput,
new SendActivity("# Running {conversation.dialogChoice}.main.dialog"),

Просмотреть файл

@ -383,7 +383,7 @@
],
"definitions": {
"Microsoft.AdaptiveDialog": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Adaptive Dialog",
"description": "Configures a data driven dialog via a collection of actions/dialogs.",
"type": "object",
@ -566,7 +566,7 @@
]
},
"Microsoft.AttachmentInput": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "AttachmentInput Dialog",
"description": "This represents a dialog which gathers an attachment such as image or music",
"type": "object",
@ -747,7 +747,7 @@
]
},
"Microsoft.BeginDialog": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Begin Dialog",
"description": "Action which begins another dialog (and when that dialog is done, it will return the caller).",
"type": "object",
@ -797,10 +797,10 @@
}
},
"dialog": {
"$type": "Microsoft.IDialog",
"$type": "Microsoft.Dialog",
"title": "Dialog",
"description": "This is the dialog to call.",
"$ref": "#/definitions/Microsoft.IDialog"
"$ref": "#/definitions/Microsoft.Dialog"
},
"options": {
"type": "object",
@ -843,7 +843,7 @@
]
},
"Microsoft.CancelAllDialogs": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Cancel All Dialogs",
"description": "Command to cancel all of the current dialogs by emitting an event which must be caught to prevent cancelation from propagating.",
"type": "object",
@ -926,7 +926,7 @@
]
},
"Microsoft.ChoiceInput": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "ChoiceInput Dialog",
"description": "This represents a dialog which gathers a choice responses",
"type": "object",
@ -1303,7 +1303,7 @@
]
},
"Microsoft.ConfirmInput": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "ConfirmInput Dialog",
"description": "This represents a dialog which gathers a yes/no style responses",
"type": "object",
@ -1735,7 +1735,7 @@
]
},
"Microsoft.DateTimeInput": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "DateTimeInput Dialog",
"description": "This represents a dialog which gathers Date or Time or DateTime from the user",
"type": "object",
@ -1912,7 +1912,7 @@
]
},
"Microsoft.DebugBreak": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Debugger Break Action",
"description": "If debugger is attached, do a debugger break at this point",
"type": "object",
@ -1984,7 +1984,7 @@
]
},
"Microsoft.DeleteProperty": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Delete Property",
"description": "This is a action which allows you to remove a property from memory",
"type": "object",
@ -2115,7 +2115,7 @@
]
},
"Microsoft.EditActions": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "EditActions Action",
"description": "Edit current dialog with changeType and Actions",
"type": "object",
@ -2181,8 +2181,8 @@
"title": "Actions",
"description": "Actions to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -2210,7 +2210,7 @@
]
},
"Microsoft.EditArray": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Edit Array Action",
"description": "This is a action which allows you to modify an array in memory",
"type": "object",
@ -2369,7 +2369,7 @@
]
},
"Microsoft.EmitEvent": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Emit Event Action",
"description": "This is a action which allows you to emit an event",
"type": "object",
@ -2478,7 +2478,7 @@
]
},
"Microsoft.EndDialog": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "End Dialog",
"description": "Command which ends the current dialog, returning the resultProperty as the result of the dialog.",
"type": "object",
@ -2558,7 +2558,7 @@
]
},
"Microsoft.EndTurn": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "End Turn",
"description": "End the current turn without ending the dialog.",
"type": "object",
@ -2780,7 +2780,7 @@
]
},
"Microsoft.Foreach": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Foreach Action",
"description": "Action which executes actions per item in a collection.",
"type": "object",
@ -2843,8 +2843,8 @@
"title": "Actions",
"description": "Actions to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
},
"indexProperty": {
@ -2886,7 +2886,7 @@
]
},
"Microsoft.ForeachPage": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Foreach Page Action",
"description": "Action which execute actions per item page in a collection.",
"type": "object",
@ -2949,8 +2949,8 @@
"title": "Actions",
"description": "Actions to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
},
"pageSize": {
@ -3095,7 +3095,7 @@
]
},
"Microsoft.HttpRequest": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"type": "object",
"title": "Http Request",
"description": "This is a action which replaces the current dialog with the target dialog",
@ -3235,9 +3235,9 @@
}
]
},
"Microsoft.IDialog": {
"title": "Microsoft IDialog",
"description": "Union of components which implement the IDialog interface",
"Microsoft.Dialog": {
"title": "Microsoft Dialog",
"description": "Union of components which implement the Dialog interface",
"$role": "unionType",
"oneOf": [
{
@ -3590,7 +3590,7 @@
]
},
"Microsoft.IfCondition": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "If Condition Action",
"description": "Action which conditionally decides which action to execute next.",
"type": "object",
@ -3653,8 +3653,8 @@
"title": "Actions",
"description": "Action to execute if condition is true.",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
},
"elseActions": {
@ -3662,8 +3662,8 @@
"title": "Else Actions",
"description": "Action to execute if condition is false.",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -3691,7 +3691,7 @@
]
},
"Microsoft.InitProperty": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Init Property Action",
"description": "This action allows you to innitial a property to either an object or array",
"type": "object",
@ -3887,7 +3887,7 @@
]
},
"Microsoft.LogAction": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Log Action",
"description": "This is a action which writes to console.log and optional creates a TraceActivity around a text binding",
"type": "object",
@ -4264,7 +4264,7 @@
]
},
"Microsoft.NumberInput": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "NumberInput Dialog",
"description": "This represents a dialog which gathers a decimal number in a specified range",
"type": "object",
@ -4503,7 +4503,7 @@
]
},
"Microsoft.OAuthInput": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "OAuthInput Dialog",
"description": "This represents a dialog which gathers an OAuth token from user",
"type": "object",
@ -4737,8 +4737,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
},
"type": {
@ -4813,8 +4813,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -4883,8 +4883,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -4953,8 +4953,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
},
"events": {
@ -5043,8 +5043,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -5113,8 +5113,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -5183,8 +5183,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -5253,8 +5253,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -5323,8 +5323,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
},
"intent": {
@ -5407,8 +5407,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -5477,8 +5477,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -5547,8 +5547,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -5617,8 +5617,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -5687,8 +5687,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -5757,8 +5757,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -5827,8 +5827,8 @@
"type": "array",
"description": "Sequence of actions or dialogs to execute",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -6012,7 +6012,7 @@
]
},
"Microsoft.QnAMakerDialog": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "QnAMaker Dialog",
"description": "This represents a dialog which is driven by a call to QnAMaker.ai knowledge base",
"type": "object",
@ -6307,7 +6307,7 @@
]
},
"Microsoft.RepeatDialog": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"type": "object",
"title": "Repeat Dialog",
"description": "This is a action which repeats the current dialog with the same dialog.",
@ -6379,7 +6379,7 @@
]
},
"Microsoft.ReplaceDialog": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"type": "object",
"title": "Replace Dialog",
"description": "This is a action which replaces the current dialog with the target dialog",
@ -6429,10 +6429,10 @@
}
},
"dialog": {
"$type": "Microsoft.IDialog",
"$type": "Microsoft.Dialog",
"title": "Dialog",
"description": "This is the dialog to switch to.",
"$ref": "#/definitions/Microsoft.IDialog"
"$ref": "#/definitions/Microsoft.Dialog"
},
"options": {
"type": "object",
@ -6474,7 +6474,7 @@
]
},
"Microsoft.SendActivity": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Send Activity Action",
"description": "This is a action which sends an activity to the user",
"type": "object",
@ -6552,7 +6552,7 @@
]
},
"Microsoft.SetProperty": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Set Property Action",
"description": "This action allows you to set memory to the value of an expression",
"type": "object",
@ -6644,7 +6644,7 @@
]
},
"Microsoft.SwitchCondition": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Switch Action",
"description": "Action which conditionally decides which action to execute next.",
"type": "object",
@ -6724,8 +6724,8 @@
"title": "Actions",
"description": "Actions to execute if case is equal to condition",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
}
@ -6736,8 +6736,8 @@
"title": "Default",
"description": "Action to execute if no case is equal to condition",
"items": {
"$type": "Microsoft.IDialog",
"$ref": "#/definitions/Microsoft.IDialog"
"$type": "Microsoft.Dialog",
"$ref": "#/definitions/Microsoft.Dialog"
}
}
},
@ -6816,7 +6816,7 @@
]
},
"Microsoft.TextInput": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "TextInput Dialog",
"description": "This represents a dialog which gathers a text from the user",
"type": "object",
@ -6999,7 +6999,7 @@
]
},
"Microsoft.TraceActivity": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Trace Activity Action",
"description": "This is a action which sends an TraceActivity to the transcript",
"type": "object",
@ -7191,7 +7191,7 @@
]
},
"Testbot.JavascriptAction": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Javascript Action",
"description": "This gives you the ability to execute javascript to manipulate memory",
"type": "object",
@ -7270,7 +7270,7 @@
]
},
"Testbot.Multiply": {
"$role": "unionType(Microsoft.IDialog)",
"$role": "unionType(Microsoft.Dialog)",
"title": "Multiply",
"description": "This will return the result of arg1*arg2",
"type": "object",

Просмотреть файл

@ -26,7 +26,7 @@ represent a bot sample.
- In the constructor, replace the line below with the name / path to your selected sample. The line below illustrates how to set up for sample 8:
```
rootDialog = CognitiveLoader.Load<IDialog>(File.ReadAllText(@"Samples\Planning 8 - ExternalLanguage\main.dialog"));
rootDialog = CognitiveLoader.Load<Dialog>(File.ReadAllText(@"Samples\Planning 8 - ExternalLanguage\main.dialog"));
```