public BackgroundForexService(ForexContext context, IMemoryCache cache)
 {
     _context    = context;
     _httpClient = new HttpClient
     {
         BaseAddress = new Uri(_baseAddress)
     };
     _cache = cache;
 }
Beispiel #2
0
        public ForexTransactionController(ForexContext context)
        {
            this.context = context;

            if (!this.context.ForexTransactions.Any())
            {
                this.context.ForexTransactions.Add(new ForexTransaction()
                {
                    OrderType     = OrderType.Buy,
                    Order         = 123456,
                    OrderOpenTime = new DateTime(2017, 8, 31, 10, 32, 00),
                    OrderPrice    = new decimal(1.12498),
                    ClosePrice    = new decimal(1.12687),
                    LotSize       = new decimal(1.1),
                    Comment       = "Test Transaction",
                    Profit        = new decimal(17.50)
                });
            }
        }
Beispiel #3
0
 public ForexExperimentMap(IMapper mapper, IOptions <Settings> settings)
 {
     _mapper  = mapper;
     _context = new ForexContext(settings);;
 }