/// <summary> /// Constructs the topic text for a route /// </summary> /// <param name="route">route information</param> /// <returns>topic text</returns> private string TopicText(RouteEntity route) { // in the common case, the topic text will be: // Discuss the LongName route string text = string.Empty; if (!string.IsNullOrWhiteSpace(route.ShortName) || !string.IsNullOrWhiteSpace(route.LongName)) { text += "Discuss the "; } if (!string.IsNullOrWhiteSpace(route.LongName)) { text += route.LongName; } else if (!string.IsNullOrWhiteSpace(route.ShortName)) { text += route.ShortName; } if (!string.IsNullOrWhiteSpace(text)) { text += " route"; } return(TopicUtils.RemoveHashtags(text)); }
/// <summary> /// Constructs the topic text for a stop /// </summary> /// <param name="stop">stop information</param> /// <returns>topic text</returns> private string TopicText(StopEntity stop) { // in the common case, the topic text will be: // Discuss the stop at Name (Direction) string text = string.Empty; if (!string.IsNullOrWhiteSpace(stop.Name)) { text += "Discuss the stop at " + stop.Name; } if (!string.IsNullOrWhiteSpace(text) && !string.IsNullOrWhiteSpace(stop.Direction)) { text += " (" + stop.Direction + ")"; } return(TopicUtils.RemoveHashtags(text)); }
/// <summary> /// Constructs the topic title for a stop /// </summary> /// <param name="stop">stop information</param> /// <returns>topic title</returns> private string TopicTitle(StopEntity stop) { // in the common case, the topic title will be: // Name (Direction) string title = string.Empty; if (!string.IsNullOrWhiteSpace(stop.Name)) { title += stop.Name; } if (!string.IsNullOrWhiteSpace(title) && !string.IsNullOrWhiteSpace(stop.Direction)) { title += " (" + stop.Direction + ")"; } return(TopicUtils.RemoveHashtags(title)); }
/// <summary> /// Constructs the topic title for a route. /// </summary> /// <param name="route">route information</param> /// <returns>topic title</returns> private string TopicTitle(RouteEntity route) { // in the common case, the topic title will be: // ShortName - LongName string title = string.Empty; if (!string.IsNullOrWhiteSpace(route.ShortName)) { title += route.ShortName; } if (!string.IsNullOrWhiteSpace(route.ShortName) && !string.IsNullOrWhiteSpace(route.LongName)) { title += " - "; } if (!string.IsNullOrWhiteSpace(route.LongName)) { title += route.LongName; } return(TopicUtils.RemoveHashtags(title)); }