protected void Application_Start() { GlobalConfiguration.Configure(WebApiConfig.Register); // wire up Unity UnityConfig.RegisterComponents(); // wire up AutoMapper AutoMapperWebApiConfig.RegisterMappings(); AutoMapperAslConfig.RegisterMappings(); // instantiate the service _zkTimeService = new ZkTimeService(); _overtimeHandler = new OvertimeHandler(); // start the zktime service _zkTimeService.Init(); // kick off timer to repeat above // once first run has completed //StartDataPollTimer(); var dataPollThreadJob = new ThreadStart(StartDataPollTimer); var dataPollThread = new Thread(dataPollThreadJob); dataPollThread.Start(); // kick off overtime timer //StartOvertimePollTimer(); var overtimePollThreadJob = new ThreadStart(StartOvertimePollTimer); var overtimePollThread = new Thread(overtimePollThreadJob); overtimePollThread.Start(); }
public void Init() { _systemAccessRoleAppService = new SystemAccessRoleAppService(_mAuditLogAppService.Object); AutoMapperAslConfig.RegisterMappings(); }