TermsAttribute Class

Definition

Attribute to override the default terms used to match a field, property or enum value to user input.

[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property)]
[System.Serializable]
public class TermsAttribute : Microsoft.Bot.Builder.FormFlow.FormFlowAttribute
[<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property)>]
[<System.Serializable>]
type TermsAttribute = class
    inherit FormFlowAttribute
Public Class TermsAttribute
Inherits FormFlowAttribute
Inheritance
TermsAttribute
Attributes

Remarks

By default terms are generated by calling the GenerateTerms(String, Int32) method with a max phrase length of 3 on the name of the field, property or enum value. Using this attribute you can specify your own regular expressions to match or if you specify the MaxPhrase attribute you can cause GenerateTerms(String, Int32) to be called on your strings with the maximum phrase length you specify. If your term is a simple alphanumeric one, then it will only be matched on word boundaries with \b unless you start your expression with parentheses in which case you control the boundary matching behavior through your regular expression.

Constructors

TermsAttribute(String[])

Regular expressions or terms used when matching user input.

Fields

Alternatives

Regular expressions for matching user input.

Properties

IsLocalizable

True if attribute is localizable.

(Inherited from FormFlowAttribute)
MaxPhrase

The maximum pharse length to use when calling GenerateTerms(String, Int32) on your supplied terms.

Applies to