Exemple #1
0
 /// <summary>
 /// Updates prices using an aggregator
 /// </summary>
 /// <param name="quotes">A dictionary of prices from various feeds.</param>
 internal static void UpdatePrice(Dictionary <String, Quote[]> quotes)
 {
     // Update the prices of each of the feeds found in the aggregator.
     PriceService.UpdateCanadaTickerPrice(quotes["CA TICKER"]);
     PriceService.UpdateUnitedKingdomTickerPrice(quotes["UK TICKER"]);
     PriceService.UpdateUnitedStatesTickerPrice(quotes["US TICKER"]);
 }
Exemple #2
0
 /// <summary>
 /// Updates prices using a United States ticker.
 /// </summary>
 /// <param name="quotes">A collection of price quotes.</param>
 internal static void UpdateUnitedStatesTickerPrice(Quote[] quotes)
 {
     // Update the price table with United States ticker symbols.
     DataModel.IEntityIndex symbolIndex   = DataModel.Entity.EntityKeyExternalId3;
     DataModel.IEntityIndex currencyIndex = DataModel.Entity.EntityKeyExternalId0;
     foreach (Quote quote in quotes)
     {
         PriceService.UpdatePriceBySymbolCurrency(symbolIndex, new Object[] { quote.Symbol }, currencyIndex, new Object[] { "USD" }, quote);
     }
 }
 public void UpdateUnitedStatesTickerPrice(Quote[] quotes)
 {
     // Update the price using the US ticker.
     PriceService.UpdateUnitedStatesTickerPrice(quotes);
 }
 public void UpdatePrice(Dictionary <String, Quote[]> quotes)
 {
     // Update the price using the US ticker.
     PriceService.UpdatePrice(quotes);
 }
 public void UpdateCurrencyPrice(Quote[] quotes)
 {
     // Update the price using the US ticker.
     PriceService.UpdateCurrencyPrice(quotes);
 }
 public void UpdateCanadaTickerPrice(Quote[] quotes)
 {
     // Update the price using the US ticker.
     PriceService.UpdateCanadaTickerPrice(quotes);
 }