public void Add(ITwitterMessageService twitterClientService) { _twitterClients.Add(twitterClientService); _compositeDisposable.Add(twitterClientService.OnMessageRecieved.Subscribe(message => { MessageReceivedFromClient(twitterClientService, message); })); }
private void MessageReceivedFromClient(ITwitterMessageService twitterClientService, string message) { TwitterCommand command = _twitterCommandService.GetCommand(message); command.TwitterClient = new TwitterClient() { Name = twitterClientService.SessionId.ToString() }; // TO COMPLETE if (command.TwitterCommandType == TwitterCommandType.Post) { // Post on the client that posted the messages wall and post on all the follower's walls twitterClientService.Send(command.ToString()); } }
public TwitterMessagesController(ILogger <TwitterMessagesController> logger, ITwitterMessageService twitterMessageService) { _logger = logger; _twitterMessageService = twitterMessageService; }