Esempio n. 1
0
 protected void Listen()
 {
     Observable
     .Interval(TimeSpan.FromSeconds(10))
     .Select(x => HttpClient.SendAsync(HttpRequestMessage).Result.Content.ReadAsStringAsync().Result)
     .Select(x => JsonConvert.DeserializeObject <SlackChannelHistory>(x))
     .Subscribe(
         x =>
     {
         OnNewMessages?.Invoke(this, x.messages);
     });
 }
Esempio n. 2
0
 protected void newMessagesArrived(IEnumerable <TwoRatChat.Model.ChatMessage> messages)
 {
     OnNewMessages?.Invoke(messages);
 }