public void SynchronizeDataTestMethod() { Logger logger = LogManager.GetCurrentClassLogger(); try { ProjectOnlineSystemConnectorHubHelper.StartHubConnection(ConfigurationManager.AppSettings["SignalRHostUrl"]); publishMax = int.Parse(ConfigurationManager.AppSettings["PublishMax"]); stagingRecordLifeTime = int.Parse(ConfigurationManager.AppSettings["StagingRecordLifeTime"]); projectsPerIteration = int.Parse(ConfigurationManager.AppSettings["ProjectsPerIteration"]); InitProjectOnlineAccessService(); using (var unitOfWork = new UnitOfWork()) { Guid winServiceIterationUid = Guid.NewGuid(); dbToProjectOnlineSync = new DbToProjectOnlineSync(unitOfWork, projectOnlineODataService, publishMax, stagingRecordLifeTime, projectsPerIteration, winServiceIterationUid); dbToProjectOnlineSync.SynchronizeData(null); } } catch (Exception exception) { logger.Error(exception); } }
protected override void OnStart(string[] args) { logger.Info("ProjectOnlineSystemConnectorWinService.OnStart START"); try { ProjectOnlineSystemConnectorHubHelper.StartHubConnection(ConfigurationManager.AppSettings["SignalRHostUrl"]); Task.Run(StartTimerJira); } catch (Exception exception) { logger.Fatal(exception); } logger.Info("ProjectOnlineSystemConnectorWinService.OnStart END"); }
public void TestMethod1() { try { ProjectOnlineSystemConnectorHubHelper.StartHubConnection(ConfigurationManager.AppSettings["SignalRHostUrl"]); Logger logger = LogManager.GetCurrentClassLogger(); logger.LogAndSendMessage(null, "TestMethod1", Guid.NewGuid(), Guid.NewGuid(), $"TestMethod1 START projectUid: {Guid.NewGuid()}", false, null, CommonConstants.Epm, CommonConstants.End); } catch (Exception exception) { var a = 1; } }