public static void Init(IList <Action <Type> > actions) { if (BrEngineContext.Current == null) { if (actions == null) { actions = new List <Action <Type> >(); } actions.Add(t => { //IRoutePublish var routes = new List <IRoutePublish>(); if (typeof(IRoutePublish).IsAssignableFrom(t)) { routes.Add((IRoutePublish)Activator.CreateInstance(t)); } if (routes.Any()) { routes.OrderBy(x => x.Order).ToList().ForEach(m => m.Publish(RouteTable.Routes)); } }); BrEngineContext.Init(actions); //set dependency resolver DependencyResolver.SetResolver(new AutofacDependencyResolver(BrEngineContext.Current)); //remove all view engines //ViewEngines.Engines.Clear(); //except the themeable razor view engine we use //ViewEngines.Engines.Add(new DefaultViewEngine()); } }
public void Init() { BrEngineContext.Init(null); _RoleService = BrEngineContext.Current.Resolve <IAC_RoleService>(); //BrMvcEngineContext.Init(null); //this._RoleService = // BrMvcEngineContext.Current.Resolve<IAC_RoleService>(); }
/// <summary> /// 应用程序的主入口点。 /// </summary> static void Main() { BrEngineContext.Init(null); ServiceBase[] ServicesToRun; ServicesToRun = new ServiceBase[] { new RunService() }; ServiceBase.Run(ServicesToRun); }
public static void Init(IList <Action <Type> > actions) { if (BrEngineContext.Current == null) { if (actions == null) { actions = new List <Action <Type> >(); } BrEngineContext.Init(actions); //set dependency resolver //var configuration = Configuration; GlobalConfiguration.Configuration.DependencyResolver = new AutofacWebApiDependencyResolver(BrEngineContext.Current); } }
public static void Main(string[] args) { BrEngineContext.Init(null); ILog log = LogManager.GetLogger("logger-name"); IScheduler _scheduler = null; try { DateTimeOffset runTime = DateTimeOffset.UtcNow; DateTimeOffset.TryParse(DateTime.Now.ToShortDateString(), out runTime); int hour = int.Parse(ConfigurationManager.AppSettings["Hour"]); int minute = int.Parse(ConfigurationManager.AppSettings["Minute"]); ISchedulerFactory sf = new StdSchedulerFactory();//执行者 _scheduler = sf.GetScheduler(); IJobDetail job1 = JobBuilder.Create <CashBackJob>() .WithIdentity("CashBackJob", "group1").Build(); //执行返现操作 每天固定时间执行 ITrigger trigger1 = TriggerBuilder.Create() .StartNow() .WithDailyTimeIntervalSchedule( a => a.WithIntervalInHours(24).OnEveryDay().StartingDailyAt(TimeOfDay.HourAndMinuteOfDay(hour, minute))) .Build(); IJobDetail bounsJob = JobBuilder.Create <BounsJob>() .WithIdentity("会员购物订单返现订单生成服务", "BounsJobGroup") .Build(); ITrigger orderTrigger = TriggerBuilder.Create() .WithIdentity(Guid.NewGuid().ToString(), "BounsJobName") .StartNow() .WithSimpleSchedule(x => x .WithIntervalInMinutes(1) .RepeatForever()) .Build(); _scheduler.ScheduleJob(bounsJob, orderTrigger); //_scheduler.ScheduleJob(job1, trigger1); _scheduler.Start(); log.Info("Quartz服务成功启动"); } catch (Exception ex) { log.Error(ex); } }
public void Init() { BrEngineContext.Init(null); this._SKU_AttributesService = BrEngineContext.Current.Resolve <ISKU_AttributesService>(); }
public void Init() { BrEngineContext.Init(null); _database = BrEngineContext.Current.Resolve <IDatabaseHelper>(); _floorCategoryService = BrEngineContext.Current.Resolve <IFloorCategoryService>(); }
public void SetUp() { BrEngineContext.Init(null); this._return_GoodsService = BrEngineContext.Current.Resolve <IReturnProductInfoService>(); }
public void Init() { BrEngineContext.Init(null); _database = BrEngineContext.Current.Resolve <IDatabaseHelper>(); _paymentOrderService = BrEngineContext.Current.Resolve <IPaymentOrderService>(); }
public void Init() { BrEngineContext.Init(null); this._bannerService = BrEngineContext.Current.Resolve <IbannerService>(); }
public void SetUp() { BrEngineContext.Init(null); this._shoppingCartService = BrEngineContext.Current.Resolve <IShoppingCartService>(); }
public void Init() { BrEngineContext.Init(null); this._userLoginLogService = BrEngineContext.Current.Resolve <IAC_OperateLogService>(); }
public void Init() { BrEngineContext.Init(null); this.shipmentService = BrEngineContext.Current.Resolve <IShipmentService>(); }
public void Init() { BrEngineContext.Init(null); _database = BrEngineContext.Current.Resolve <IDatabaseHelper>(); _suppliersService = BrEngineContext.Current.Resolve <ISuppliersService>(); }
public void Init() { BrEngineContext.Init(null); this._dbContext = BrEngineContext.Current.Resolve <IBcDbContext>(); this._userAddressService = BrEngineContext.Current.Resolve <IUserAddressService>(); }
public void Init() { BrEngineContext.Init(null); this._zJ_WithdrawOrderService = BrEngineContext.Current.Resolve <IZJ_WithdrawOrderService>(); }
public void Init() { BrEngineContext.Init(null); this._OrderService = BrEngineContext.Current.Resolve <IOrderService>(); this._enctyptionService = BrEngineContext.Current.Resolve <IEncryptionService>(); }
public void Init() { BrEngineContext.Init(null); this._dbContext = BrEngineContext.Current.Resolve <IBcDbContext>(); this._acUserService = BrEngineContext.Current.Resolve <IAC_UserService>(); }
public void Init() { BrEngineContext.Init(null); _database = BrEngineContext.Current.Resolve <IDatabaseHelper>(); _salesProductService = BrEngineContext.Current.Resolve <ISalesProductService>(); }
public void Init() { BrEngineContext.Init(null); _aC_FunctionService = BrEngineContext.Current.Resolve <IAC_FunctionService>(); }
public void Init() { BrEngineContext.Init(null); this._zjRechargeOrderService = BrEngineContext.Current.Resolve <IZJ_RechargeOrderService>(); }
public void Init() { BrEngineContext.Init(null); _acDepartmentService = BrEngineContext.Current.Resolve <IAC_DepartmentService>(); }
public void Init() { BrEngineContext.Init(null); _database = BrEngineContext.Current.Resolve <IDatabaseHelper>(); _productImageService = BrEngineContext.Current.Resolve <IProductImageService>(); }
public void Init() { BrEngineContext.Init(null); this._dbContext = BrEngineContext.Current.Resolve <IBcDbContext>(); this._parameterSetService = BrEngineContext.Current.Resolve <IParameterSetService>(); }
public void Init() { BrEngineContext.Init(null); this._zjUserBalanceChangeLogService = BrEngineContext.Current.Resolve <IZJ_UserBalanceChangeLogService>(); }
public void SetUp() { BrEngineContext.Init(null); this._complaintsService = BrEngineContext.Current.Resolve <IComplaintsService>(); }
public void Init() { BrEngineContext.Init(null); this._sp_productCommentService = BrEngineContext.Current.Resolve <ISP_ProductCommentService>(); }
public void Init() { BrEngineContext.Init(null); this._newInfoService = BrEngineContext.Current.Resolve <INewInfoService>(); }
public void Init() { BrEngineContext.Init(null); this._dbContext = BrEngineContext.Current.Resolve <IBcDbContext>(); this._baseService = BrEngineContext.Current.Resolve <IBrandService>(); }
public void Init() { BrEngineContext.Init(null); this._FloorConfigService = BrEngineContext.Current.Resolve <IFloorConfigService>(); }