コード例 #1
0
 /// <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,
     });
 }
コード例 #2
0
ファイル: BookCopier.cs プロジェクト: otac0n/SharpBooks
        /// <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);
            }
        }
コード例 #3
0
ファイル: BookCopier.cs プロジェクト: otac0n/SharpBooks
        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);
            }
        }
コード例 #4
0
ファイル: SaveTrack.cs プロジェクト: otac0n/SharpBooks
 /// <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,
     });
 }