private string SanitizeMessage(string botmessage) { string message = botmessage; if (botmessage == null || botmessage == string.Empty) { message = Resources.en_us.resources.defaultMessage; } var sanitizeFactory = new EscapeSanitizer(); message = sanitizeFactory.Sanitize(botmessage); return(message); }
public ResponseOption CanbeHandledbyMe(string question) { EscapeSanitizer escaptesanitzer = new EscapeSanitizer(); string satizedResouce = escaptesanitzer.Sanitize(resources.mostViewed); if (question.Contains(satizedResouce)) { return(ResponseOption.FullyHandled); } else { return(ResponseOption.NotHandled); } }
private TimeOption getOption(string question) { TimeOption option = TimeOption.notSpecified; EscapeSanitizer escaptesanitzer = new EscapeSanitizer(); string satizedThisWeekResouce = escaptesanitzer.Sanitize(resources.thisWeek); string satizedThisMonthResouce = escaptesanitzer.Sanitize(resources.thisMonth); string satizedThisYearResouce = escaptesanitzer.Sanitize(resources.thisYear); if (question.Contains(satizedThisWeekResouce)) { option = TimeOption.ThisWeek; } if (question.Contains(satizedThisMonthResouce)) { option = TimeOption.ThisMonth; } if (question.Contains(satizedThisYearResouce)) { option = TimeOption.ThisYear; } return(option); }