public KissCILoggingAdapter(IProjectService projectService, ProjectInfo info, ProjectBuild build) { _projectService = projectService; _info = info; _build = build; }
void UpdateInfo(IDataContext ctx, KissProject kissProject, IList<ProjectInfo> infos, bool isRegistration = false) { if (infos.Any(i => i.ProjectName == kissProject.Name) == false) { var info = new ProjectInfo { ProjectName = kissProject.Name, Category = kissProject.Category, Activity = Activity.Sleeping, Status = Status.Running }; ctx.ProjectInfoService.Save(info); if(isRegistration) _registeredProjects.Add(kissProject); } else { //we update the category just in case it's been modified var info = infos.FirstOrDefault(i => i.ProjectName == kissProject.Name); if (info != null) { info.Category = kissProject.Category; ctx.ProjectInfoService.Save(info); } } }