Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public async Task NewsSend([FromBody] NewsTopic news)
 {
     await Task.Run(() => manager.NewsSend(news));
 }