public void AddModerator(int forumId, int subForumId, int moderatorId) { if (_real != null) { _real.AddModerator(forumId, subForumId, moderatorId); } throw new NotImplementedException(); }
public void AddModerator(int userId, int forumId, int subForumId, int moderatorId) { if (_real != null) { _real.AddModerator(1, forumId, subForumId, moderatorId); } throw new NullReferenceException("_real in null"); }
public HttpResponseMessage Post_addModerator(int forumId, int subForumId, int userId, int moderatorId) { try { driver.AddModerator(userId, forumId, subForumId, moderatorId); HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK); return(response); } catch (Exception e) { var data = new { message = e.Message }; HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.NotFound, data); return(response); } }