/// <summary> /// Adds a price quote to the <see cref="SaveTrack"/>. /// </summary> /// <param name="priceQuote">The price quote to add.</param> public void AddPriceQuote(PriceQuoteData priceQuote) { this.actions.Add(new Action { ActionType = ActionType.AddPriceQuote, Item = priceQuote, }); }
/// <inheritdoc/> public void AddPriceQuote(PriceQuoteData priceQuote) { lock (this) { var security = this.destinationBook.Securities.Where(s => s.SecurityId == priceQuote.SecuritySecurityId).Single(); var currency = this.destinationBook.Securities.Where(s => s.SecurityId == priceQuote.CurrencySecurityId).Single(); var newPriceQuote = new PriceQuote( priceQuote.PriceQuoteId, priceQuote.DateTime, security, priceQuote.Quantity, currency, priceQuote.Price, priceQuote.Source); this.destinationBook.AddPriceQuote( newPriceQuote); } }
public void AddPriceQuote(PriceQuoteData priceQuote) { lock (this) { var security = this.destinationBook.Securities.Where(s => s.SecurityId == priceQuote.SecuritySecurityId).Single(); var currency = this.destinationBook.Securities.Where(s => s.SecurityId == priceQuote.CurrencySecurityId).Single(); var newPriceQuote = new PriceQuote( priceQuote.PriceQuoteId, priceQuote.DateTime, security, priceQuote.Quantity, currency, priceQuote.Price, priceQuote.Source); this.destinationBook.AddPriceQuote( newPriceQuote); } }