|
6 | 6 | namespace Quotations.Services |
7 | 7 | { |
8 | 8 | [Service(typeof(IQuotationService))] |
9 | | - class QuotationService : IQuotationService |
| 9 | + internal class QuotationService : IQuotationService |
10 | 10 | { |
11 | | - private readonly Quotation[] array = |
12 | | - { |
13 | | - new Quotation {AskPrice = 10.50m, BidPrice = 10.55m, SecurityCode = "ING.S.NYSE"}, |
14 | | - new Quotation {AskPrice = 12.50m, BidPrice = 12.55m, SecurityCode = "ING.B.NYSE"}, |
15 | | - new Quotation {AskPrice = 10.70m, BidPrice = 10.75m, SecurityCode = "AAPL.B.NASDAQ"}, |
16 | | - new Quotation {AskPrice = 11.50m, BidPrice = 11.55m, SecurityCode = "AAPL.S.NASDAQ"}, |
17 | | - new Quotation {AskPrice = 16.50m, BidPrice = 16.55m, SecurityCode = "MSFT.B.NASDAQ"}, |
18 | | - new Quotation {AskPrice = 17.50m, BidPrice = 17.55m, SecurityCode = "ING.B.AEX"}, |
19 | | - new Quotation {AskPrice = 10.51m, BidPrice = 10.59m, SecurityCode = "ING.S.AEX"}, |
20 | | - }; |
21 | | - |
22 | | - public Quotation[] GetQuotations(string exchange, string instrument, DateTime @from, DateTime to) |
| 11 | + private readonly Quotation[] array = |
| 12 | + { |
| 13 | + new Quotation {AskPrice = 10.50m, BidPrice = 10.55m, SecurityCode = "ING.S.NYSE"}, |
| 14 | + new Quotation {AskPrice = 12.50m, BidPrice = 12.55m, SecurityCode = "ING.B.NYSE"}, |
| 15 | + new Quotation {AskPrice = 10.70m, BidPrice = 10.75m, SecurityCode = "AAPL.B.NASDAQ"}, |
| 16 | + new Quotation {AskPrice = 11.50m, BidPrice = 11.55m, SecurityCode = "AAPL.S.NASDAQ"}, |
| 17 | + new Quotation {AskPrice = 16.50m, BidPrice = 16.55m, SecurityCode = "MSFT.B.NASDAQ"}, |
| 18 | + new Quotation {AskPrice = 17.50m, BidPrice = 17.55m, SecurityCode = "ING.B.AEX"}, |
| 19 | + new Quotation {AskPrice = 10.51m, BidPrice = 10.59m, SecurityCode = "ING.S.AEX"} |
| 20 | + }; |
| 21 | + |
| 22 | + public Quotation[] GetQuotations(string exchange, string instrument, DateTime from, DateTime to) |
23 | 23 | { |
24 | 24 | var result = array.Where(q => q.SecurityCode.Contains(exchange)); |
25 | 25 |
|
|
0 commit comments