コード例 #1
0
 public OrderService(FantasyTraderDataContext context, ILogger<OrderService> logger, IHubContext<OrderHub> hub, FantasyMarketPriceSource prices)
 {
     _context = context;
     _logger = logger;
     _hub = hub;
     _prices = prices;
 }
コード例 #2
0
        private FantasyTraderDataContext GetContext(string methodName)
        {
            var connection = new SqliteConnection("DataSource=:memory:");

            connection.Open();
            var options = new DbContextOptionsBuilder <FantasyTraderDataContext>()
                          .UseSqlite(connection)
                          .Options;
            var context       = new FantasyTraderDataContext(options);
            var dbInitialiser = new DbInitialiser(context, new NullLogger <DbInitialiser>());

            dbInitialiser.Initialize();
            return(context);
        }
コード例 #3
0
 public InstrumentsController(FantasyTraderDataContext context)
 {
     _context = context;
 }
コード例 #4
0
 public PositionsController(ILogger <PositionsController> logger, FantasyTraderDataContext context)
 {
     _logger  = logger;
     _context = context;
 }
コード例 #5
0
 public OrdersController(FantasyTraderDataContext context, IHubContext <OrderHub> hub, OrderService orderService)
 {
     _context      = context;
     _hub          = hub;
     _orderService = orderService;
 }
コード例 #6
0
 public PriceGridsController(FantasyTraderDataContext context)
 {
     _context = context;
 }
コード例 #7
0
 public AccountsController(FantasyTraderDataContext context)
 {
     _context = context;
 }
コード例 #8
0
 public OrderHub(FantasyTraderDataContext context, OrderService orderService, ILogger <OrderHub> logger)
 {
     _context      = context;
     _orderService = orderService;
     _logger       = logger;
 }