forked from microsoft/BotBuilder-Samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLuisActionBindingAttribute.cs
More file actions
32 lines (24 loc) · 891 Bytes
/
LuisActionBindingAttribute.cs
File metadata and controls
32 lines (24 loc) · 891 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
namespace Microsoft.Cognitive.LUIS.ActionBinding
{
using System;
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public class LuisActionBindingAttribute : Attribute
{
public LuisActionBindingAttribute(string intentName)
{
if (string.IsNullOrWhiteSpace(intentName))
{
throw new ArgumentException(nameof(intentName));
}
this.IntentName = intentName;
// setting defaults
this.CanExecuteWithNoContext = true;
this.ConfirmOnSwitchingContext = true;
this.FriendlyName = this.IntentName;
}
public bool CanExecuteWithNoContext { get; set; }
public bool ConfirmOnSwitchingContext { get; set; }
public string FriendlyName { get; set; }
public string IntentName { get; private set; }
}
}