private void EnsureProjectLoaded(string path) { // ensure project exists for the tesing purposes ZeroProject project = this._zeroProjectsService.GetProject(path); if (project == null) { project = this._zeroProjectsService.AddProject(path); } }
internal ZeroView AddViewToProject(string projectPath, string viewTitle) { if (this._projectsMap.ContainsKey(projectPath)) { ZeroProject project = this._projectsMap[projectPath]; ZeroView view = project.AddView(viewTitle); return(view); } return(null); }
internal bool SaveProject(string path) { if (this._projectsMap.ContainsKey(path)) { ZeroProject project = this._projectsMap[path]; project.Save(); return(true); } return(false); }
public JsonResult Get(string path) { //var path = @"C:\Work\Samples\Web\WebApplication\src\TestClassLibrary"; ZeroProject project = this._zeroProjectsService.GetProject(path); if (project == null) { project = this._zeroProjectsService.AddProject(path); } return(Json(project)); }
internal ZeroProject AddProject(string path) { ZeroProject project; if (this._projectsMap.ContainsKey(path)) { project = this._projectsMap[path]; } else { bool result = ZeroProject.TryLoadProject(path, out project); if (result) { this._projectsMap[path] = project; } else { return(null); } } return(project); }