public PricePredictionController( ILangService langService, IMapper mapper, IViewRenderService viewRenderService, IUnitOfWorkAsync unitOfWork, ISettingService settingService, ITemplateService templateService, ISysUserService sysUserService, IPricePredictionService pricePredictionService, IPricePredictionHistoryService pricePredictionHistoryService, IQuartzSchedulerService quartzSchedulerService, IBTCPriceService btcPriceService, IHubContext <UserPredictionProgressHub> progressHubContext) { this._langService = langService; this._mapper = mapper; this._viewRenderService = viewRenderService; this._settingService = settingService; this._unitOfWork = unitOfWork; this._templateService = templateService; this._sysUserService = sysUserService; this._pricePredictionService = pricePredictionService; this._pricePredictionHistoryService = pricePredictionHistoryService; this._quartzSchedulerService = quartzSchedulerService; this._btcPriceService = btcPriceService; this._progressHubContext = progressHubContext; }
public PricePredictionViewComponent(ISysUserService sysUserService, IBTCPriceService btcPriceService, IPricePredictionService pricePredictionService, IPricePredictionHistoryService pricePredictionHistoryService) { this._sysUserService = sysUserService; this._btcPriceService = btcPriceService; this._pricePredictionHistoryService = pricePredictionHistoryService; this._pricePredictionService = pricePredictionService; }
public Resolver() { var builder = new ContainerBuilder(); builder.Register(x => { var optionsBuilder = new DbContextOptionsBuilder <CPLContext>(); optionsBuilder.UseSqlServer(CPLPredictionGameService.Configuration["ConnectionString"]); return(optionsBuilder.Options); }); builder.RegisterType <SysUserService>().As <ISysUserService>().InstancePerDependency(); builder.RegisterType <LangService>().As <ILangService>().InstancePerDependency(); builder.RegisterType <PricePredictionService>().As <IPricePredictionService>().InstancePerDependency(); builder.RegisterType <PricePredictionDetailService>().As <IPricePredictionDetailService>().InstancePerDependency(); builder.RegisterType <PricePredictionHistoryService>().As <IPricePredictionHistoryService>().InstancePerDependency(); builder.RegisterType <PricePredictionSettingService>().As <IPricePredictionSettingService>().InstancePerDependency(); builder.RegisterType <PricePredictionSettingDetailService>().As <IPricePredictionSettingDetailService>().InstancePerDependency(); builder.RegisterType <CoinTransactionService>().As <ICoinTransactionService>().InstancePerDependency(); builder.RegisterType <SettingService>().As <ISettingService>().InstancePerDependency(); builder.RegisterType <BTCPriceService>().As <IBTCPriceService>().InstancePerDependency(); builder.RegisterType <UnitOfWork>().As <IUnitOfWorkAsync>().InstancePerLifetimeScope(); builder.RegisterType <CPLContext>().As <IDataContextAsync>().InstancePerLifetimeScope(); builder.RegisterType <Repository <SysUser> >().As <IRepositoryAsync <SysUser> >().InstancePerLifetimeScope(); builder.RegisterType <Repository <Lang> >().As <IRepositoryAsync <Lang> >().InstancePerLifetimeScope(); builder.RegisterType <Repository <PricePrediction> >().As <IRepositoryAsync <PricePrediction> >().InstancePerLifetimeScope(); builder.RegisterType <Repository <PricePredictionDetail> >().As <IRepositoryAsync <PricePredictionDetail> >().InstancePerLifetimeScope(); builder.RegisterType <Repository <PricePredictionHistory> >().As <IRepositoryAsync <PricePredictionHistory> >().InstancePerLifetimeScope(); builder.RegisterType <Repository <PricePredictionSetting> >().As <IRepositoryAsync <PricePredictionSetting> >().InstancePerLifetimeScope(); builder.RegisterType <Repository <PricePredictionSettingDetail> >().As <IRepositoryAsync <PricePredictionSettingDetail> >().InstancePerLifetimeScope(); builder.RegisterType <Repository <CoinTransaction> >().As <IRepositoryAsync <CoinTransaction> >().InstancePerLifetimeScope(); builder.RegisterType <Repository <Setting> >().As <IRepositoryAsync <Setting> >().InstancePerLifetimeScope(); builder.RegisterType <Repository <BTCPrice> >().As <IRepositoryAsync <BTCPrice> >().InstancePerLifetimeScope(); this.Container = builder.Build(); this.UnitOfWork = this.Container.Resolve <IUnitOfWorkAsync>(); this.SysUserService = this.Container.Resolve <ISysUserService>(); this.LangService = this.Container.Resolve <ILangService>(); this.PricePredictionService = this.Container.Resolve <IPricePredictionService>(); this.PricePredictionDetailService = this.Container.Resolve <IPricePredictionDetailService>(); this.PricePredictionHistoryService = this.Container.Resolve <IPricePredictionHistoryService>(); this.PricePredictionSettingService = this.Container.Resolve <IPricePredictionSettingService>(); this.PricePredictionSettingDetailService = this.Container.Resolve <IPricePredictionSettingDetailService>(); this.CoinTransactionService = this.Container.Resolve <ICoinTransactionService>(); this.SettingService = this.Container.Resolve <ISettingService>(); this.BTCPriceService = this.Container.Resolve <IBTCPriceService>(); }