public List <ElementModel.Element> GetTaskVisualization(string id) { try { TaskService taskService = new TaskService(); return(taskService.GetTaskVisualization(id)); } catch (Exception ex) { throw InternalError.ThrowError(ex); } }
public List <ElementModel.Element> GetSessionVisualization(string id) { try { SessionService sessionService = new SessionService(); return(sessionService.GetSessionVisualization(id)); } catch (Exception ex) { throw InternalError.ThrowError(ex); } }
public IEnumerable <TaskGridModel> GetTaskGrid() { try { TaskService taskService = new TaskService(); return(taskService.GetTaskGrid()); } catch (Exception ex) { throw InternalError.ThrowError(ex); } }
public IEnumerable <SessionGridModel> GetSessionGrid() { try { SessionService sessionService = new SessionService(); return(sessionService.GetSessionGrid()); } catch (Exception ex) { throw InternalError.ThrowError(ex); } }
public HttpResponseMessage GetGlobalProjects() { try { ProjectService projectService = new ProjectService(); var projects = projectService.GetDistinctProjects(); return(Request.CreateResponse(HttpStatusCode.OK, projects, "application/json")); } catch (Exception ex) { throw InternalError.ThrowError(ex); } }
public HttpResponseMessage Get() { try { PharoSessionService sessionService = new PharoSessionService(); List <PharoSessionModel> sessionModelCollection = sessionService.GetAll(); return(Request.CreateResponse(HttpStatusCode.OK, sessionModelCollection, "application/json")); } catch (Exception ex) { throw InternalError.ThrowError(ex); } }
public HttpResponseMessage GetSourceCodeisualization(string originalId) { try { VisualizationService visualizationService = new VisualizationService(); var view3dData = visualizationService.GetView3dSourceCode(originalId); var data = new JavaScriptSerializer().Serialize(view3dData); var response = Request.CreateResponse(HttpStatusCode.OK); response.Content = new StringContent(data, Encoding.UTF8, "application/json"); return(response); } catch (Exception ex) { throw InternalError.ThrowError(ex); } }
public HttpResponseMessage GetView3UserFilterVisualization(TaskProjectModel filter) { try { VisualizationService visualizationService = new VisualizationService(); var view3dData = visualizationService.GetView3dUserDataFilter(filter); var data = new JavaScriptSerializer().Serialize(view3dData); var response = Request.CreateResponse(HttpStatusCode.OK); response.Content = new StringContent(data, Encoding.UTF8, "application/json"); return(response); } catch (Exception ex) { throw InternalError.ThrowError(ex); } }
public string Post(PharoSession session) { try { if (session.Id == new Guid("00000000-0000-0000-0000-000000000000")) { return("Post rejected: session.Identifier equal 00000000-0000-0000-0000-000000000000."); } SessionSingleton.Instance.PostSessionList.Enqueue(session); SessionSingleton.Instance.ProcessPosting(); return("Object created or updated!"); } catch (Exception ex) { throw InternalError.ThrowError(ex); } }