protected static string NewsTopicToString(NewsTopic topic) { switch (topic) { case NewsTopic.TopHeadlines: return("h"); case NewsTopic.World: return("w"); case NewsTopic.Business: return("b"); case NewsTopic.Nation: return("n"); case NewsTopic.ScienceAndTechnology: return("t"); case NewsTopic.Election: return("el"); case NewsTopic.Politics: return("p"); case NewsTopic.Entertainment: return("e"); case NewsTopic.Sports: return("s"); case NewsTopic.Health: return("m"); } return(null); }
public async Task NewsSend([FromBody] NewsTopic news) { await Task.Run(() => manager.NewsSend(news)); }