public static bool SayingGreetingRecently(this GreetingState greetingState) { if (!greetingState.Completed()) { return(false); } return((DateProvider.CurrentDateForBot - greetingState.LastGreeting).Minutes < 2); }
public static bool Completed(this GreetingState greetingState) { return(greetingState != null && !string.IsNullOrWhiteSpace(greetingState.Name) && !string.IsNullOrWhiteSpace(greetingState.City)); }