public async Task <IObservable <Quote> > join(params string[] args) { var channels = this.parseChannels(args); foreach (var channel in channels) { this.channels[channel] = true; if (this.websocket != null && websocket.State == WebSocketState.Open) { await this.sendMessage(new IntrinioMessage() { Topic = this.parseTopic(channel), Event = "phx_join" }, CancellationToken.None); this.debug("Joined channel: ", channel); } } return(QuoteObservable.Where(quote => channels.Contains(quote.Ticker))); }
public IObservable <Quote> getQuoteObservable(string channel) { return(QuoteObservable.Where((quote) => quote.Ticker == channel)); }