Exemple #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);
             }
         }
     }
 }
        //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);
                    }
                }
            }
        }
Exemple #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
         {
         }
     }
 }