Beispiel #1
0
        public static object Success <T>(this SherlockApiController controller, T obj)
        {
            var response = obj.IncludeResponse();

            controller.SetStatusCode(HttpStatusCode.OK);
            return(response);
        }
Beispiel #2
0
        static object Error <T>(this SherlockApiController controller, T obj, string code, string message, HttpStatusCode httpCode)
        {
            var response = obj.IncludeResponse(message, code);

            controller.SetStatusCode(httpCode);
            //var res = controller.StatusCode((int)httpCode, response);
            return(response);
        }
Beispiel #3
0
 public static object Success(this SherlockApiController controller)
 {
     controller.SetStatusCode(HttpStatusCode.OK);
     return(default(object));
 }