コード例 #1
0
 private void AddWatch(string tickerSymbol)
 {
     if (!String.IsNullOrEmpty(tickerSymbol))
     {
         string upperCasedTrimmedSymbol = tickerSymbol.ToUpper(CultureInfo.InvariantCulture).Trim();
         if (!WatchItems.Contains(upperCasedTrimmedSymbol))
         {
             if (marketFeedService.SymbolExists(upperCasedTrimmedSymbol))
             {
                 WatchItems.Add(upperCasedTrimmedSymbol);
             }
         }
     }
 }
コード例 #2
0
        //public ObservableCollection<string> RetrieveWatchList()
        //{
        //  return WatchItems;
        //}

        private void AddWatch(string tickerSymbol)
        {
            if (!String.IsNullOrEmpty(tickerSymbol))
            {
                string upperCasedTrimmedSymbol = tickerSymbol.ToUpper(CultureInfo.InvariantCulture).Trim();
                //if (!WatchItems.Contains(upperCasedTrimmedSymbol))
                {
                    if (marketFeedService.SymbolExists(upperCasedTrimmedSymbol))
                    {
                        eventAggregator.GetEvent <AddWatchStockEvent>().Publish(upperCasedTrimmedSymbol); // This stock wants to be watched
                        //WatchItems.Add(upperCasedTrimmedSymbol);
                    }
                }
            }
        }
コード例 #3
0
 private void AddWatch(string tickerSymbol)
 {
     if (!String.IsNullOrEmpty(tickerSymbol))
     {
         string upperCasedTrimmedSymbol = tickerSymbol.ToUpper(CultureInfo.InvariantCulture).Trim();
         if (!WatchItems.Contains(upperCasedTrimmedSymbol))
         {
             if (marketFeedService.SymbolExists(upperCasedTrimmedSymbol))
             {
                 WatchItems.Add(upperCasedTrimmedSymbol);
                 this.eventAggregator.GetEvent <AddWatchTickerSymbolEvent>().Publish(true);
             }
         }
         else
         {
         }
     }
 }