コード例 #1
0
        protected override async Task <bool> ImplementExecute()
        {
            foreach (var tweet in _tweets)
            {
                var responseMessages = _hashtagResponseFactory
                                       .Generate(tweet);

                foreach (var responseMessage in responseMessages)
                {
                    try
                    {
                        await _twitterRepository.SendTweet(
                            responseMessage);
                    }
                    catch (Exception)
                    {
                        //TODO: queue this for later
                        Console.WriteLine($"Failed to write response to {tweet.id_str}");
                    }
                }
            }

            return(true);
        }