public ActionResult ProcessRequest(MetaBlogRequest metaBlogRequest) { Type type = GetType(); var xml = type.InvokeMember(metaBlogRequest.MethodCall, BindingFlags.Instance | BindingFlags.Public | BindingFlags.InvokeMethod, null, this, new object[] {metaBlogRequest.Params}); return new ContentResult() {Content = xml.ToString(), ContentType = "text/xml"}; }
public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) { if (controllerContext == null) { throw new ArgumentNullException("controllerContext"); } try { var model = new MetaBlogRequest(controllerContext.HttpContext.Request.InputStream); return model; } catch (Exception) { throw new HttpException("Invalid Request"); } }