/// <summary> /// Returns success if the <paramref name="predicate"/> function matches on the message. /// </summary> /// <param name="_"></param> /// <param name="predicate"></param> /// <returns></returns> public static MessageMatcher Message(this IMatchExt _, Func <Message, bool> predicate) => new PredicateMatcher(predicate);
/// <summary> /// Returns success if the regex <paramref name="pattern"/> matches the message text. /// </summary> /// <param name="_"></param> /// <param name="pattern"></param> /// <returns></returns> public static MessageMatcher Regex(this IMatchExt _, string pattern) => new RegexMatcher(pattern);
/// <summary> /// Returns success if the <paramref name="text"/> is a case-insesitive substring /// of the message text. /// </summary> /// <param name="_"></param> /// <param name="text"></param> /// <returns></returns> public static MessageMatcher Text(this IMatchExt _, string text) => new TextMatcher(text);
/// <summary> /// Returns success if any of the strings defined in <paramref name="text"/> /// exist as a case-insensitive substring of the message text. /// </summary> /// <param name="_"></param> /// <param name="text"></param> /// <returns></returns> public static MessageMatcher Any(this IMatchExt _, params string[] text) => new AnyOfMatcher(text);
public static MessageMatcher LuisIntent(this IMatchExt _, string intentName, decimal confidenceThreshold = 0.9m, bool spellCheck = true) => new LuisIntentMatcher(intentName, confidenceThreshold, spellCheck);