Rachakonda

Rachakonda Rachakonda

Niner since 2011

Comments

  • Rx Workshop: Schedulers

          I am getting the following exception       
    Specified argument was out of the range of valid values.
     
    Any Ideas??..
            IObservable<StockQuote> GetQuotes(IScheduler scheduler, IEnumerable<StockQuote> quotes)
            {
                // TODO: Create an observable source of stock quotes
                // HINT: Use both the scheduler and the quotes and think about how to create sources which are like events          
    
              return quotes.ToObservable<StockQuote>().ObserveOn(scheduler);
            }
    
            IObservable<object> Query(IObservable<StockQuote> quotes)
            {
                // TODO: Write a query to grab the Microsoft "MSFT" stock quotes and output the closing price
                // HINT: Make sure you include a property in the result which has a type of DateTime
    
              var filteredQuotes = from quote in quotes
                                   where quote.Symbol == "MSFT"
                                   select quote;
    
              return filteredQuotes;
            }