Esempio n. 1
0
        /// <summary>
        /// Called upon HTTP GET request to /home, initially creates an empty model containing tweet statistics
        /// and starts observing and processing the twitter stream.
        /// </summary>
        /// <returns>The index view using the current tweet statistics model.</returns>
        public IActionResult Index()
        {
            if (TweetStatisticModel == null)
            {
                TweetStatisticModel = new TweetEvaluationModel();
                StartTweetStreamProcessing();
            }

            return(View(TweetStatisticModel));
        }
Esempio n. 2
0
 public IActionResult UpdateFilter(TweetEvaluationModel model)
 {
     TweetStatisticModel = model;
     StartTweetStreamProcessing();
     return(View(nameof(Index), TweetStatisticModel));
 }