public EventsSubscriber(
     SubscriberSettings settings,
     ITradesService tradesService,
     ILogger <EventsSubscriber> logger)
 {
     _settings      = settings;
     _tradesService = tradesService;
     _logger        = logger;
 }
Пример #2
0
        public void Init()
        {
            var optionsBuilder = new DbContextOptionsBuilder <ApplicationDbContext>();

            optionsBuilder.UseInMemoryDatabase("databaseManagerService");
            context = new ApplicationDbContext(optionsBuilder.Options);

            tradesService = new TradesService(context);
        }
 public TradesController(
     ICompaniesService companiesService,
     ITradesService tradesService,
     UserManager <ApplicationUser> userManager)
 {
     this.companiesService = companiesService;
     this.userManager      = userManager;
     this.tradesService    = tradesService;
 }
Пример #4
0
 public BrokerController(IManagerService managerService, ITrustManagementService trustManagementService,
                         IBrokerValidator brokerValidator, UserManager <ApplicationUser> userManager, ITradesService tradesService, ILogger <BrokerController> logger)
     : base(userManager)
 {
     this.managerService         = managerService;
     this.trustManagementService = trustManagementService;
     this.tradesService          = tradesService;
     this.brokerValidator        = brokerValidator;
     this.logger = logger;
 }
 public TradesControllerTests()
 {
     this.optionsBuilder = new DbContextOptionsBuilder <ApplicationDbContext>()
                           .UseInMemoryDatabase("tradesDatabase");
     this.db               = new ApplicationDbContext(this.optionsBuilder.Options);
     this.repo             = new EfDeletableEntityRepository <Company>(this.db);
     this.companiesService = new CompaniesService(this.repo);
     this.tradesService    = new TradesService(this.db, this.companiesService);
     this.userManager      = new FakeUserManager();
     this.controller       = new TradesController(this.companiesService, this.tradesService, this.userManager);
 }
Пример #6
0
 public InvestorController(ITrustManagementService trustManagementService, IUserService userService, IInvestorValidator investorValidator, UserManager <ApplicationUser> userManager, IStatisticService statisticService, ITradesService tradesService, IWalletService walletService, ILogger <InvestorController> logger)
     : base(userManager)
 {
     this.trustManagementService = trustManagementService;
     this.investorValidator      = investorValidator;
     this.userService            = userService;
     this.statisticService       = statisticService;
     this.tradesService          = tradesService;
     this.walletService          = walletService;
     this.logger = logger;
 }
Пример #7
0
 public CompaniesControllerTests()
 {
     this.optionsBuilder = new DbContextOptionsBuilder <ApplicationDbContext>()
                           .UseInMemoryDatabase("companiesDatabase");
     this.db                  = new ApplicationDbContext(this.optionsBuilder.Options);
     this.repo                = new EfDeletableEntityRepository <Company>(this.db);
     this.companiesService    = new CompaniesService(this.repo);
     this.tradesService       = new TradesService(this.db, this.companiesService);
     this.httpContext         = new DefaultHttpContext();
     this.tempData            = new TempDataDictionary(this.httpContext, Mock.Of <ITempDataProvider>());
     this.controller          = new CompaniesController(this.companiesService);
     this.controller.TempData = this.tempData;
 }
Пример #8
0
 public TradesController(
     ITradesService tradesService)
 {
     _tradesService = tradesService;
 }
Пример #9
0
 public TradesController(ITradesService tradesService, IOHCLService ohclService)
 {
     _tradesService = tradesService;
     _ohclService   = ohclService;
 }
Пример #10
0
 public TradesController(ITradesService tradesService)
 {
     _tradesService = tradesService ?? throw new ArgumentNullException(nameof(tradesService));
 }
Пример #11
0
 public TradesController(IMapper mapper, ITradesService tradesService)
 {
     _mapper        = mapper;
     _tradesService = tradesService;
 }
Пример #12
0
 public TradesController(IIpfsService ipfsService, ITradesService tradesServer, UserManager <ApplicationUser> userManager)
     : base(userManager)
 {
     this.ipfsService  = ipfsService;
     this.tradesServer = tradesServer;
 }