public IHttpContext LoadProject(IHttpContext ctx) { if (ctx.Request.QueryString["projectid"] == null) { HttpResponseExtensions.SendResponse(ctx.Response, HttpStatusCode.Ok, "{\"status\": \"error\", \"reason\": \"not found\"}"); return(ctx); } MProject p = SqliteDb.GetProject(Int32.Parse(ctx.Request.QueryString["projectid"])); XBimParser parsival = new XBimParser(p.FileName); parsival.LoadGeometry(); if (parsival.HasLoaded()) { sessions.Add(sessionCounter, parsival); HttpResponseExtensions.SendResponse(ctx.Response, HttpStatusCode.Ok, "{\"status\": \"success\", \"session\": " + sessionCounter.ToString() + "}"); sessionCounter++; } return(ctx); }