예제 #1
0
 /// <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);
예제 #2
0
 /// <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);
예제 #3
0
 /// <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);
예제 #4
0
 /// <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);
예제 #5
0
 public static MessageMatcher LuisIntent(this IMatchExt _, string intentName, decimal confidenceThreshold = 0.9m, bool spellCheck = true)
 => new LuisIntentMatcher(intentName, confidenceThreshold, spellCheck);