public ActionResult MetricList() { var response = new OperationResponse() .ToUi((r) => RenderPartialViewToString("MetricList", r)); return Json(response, JsonRequestBehavior.AllowGet); }
public Processor(Action<Exception, Processor> onException, string name) { _onException = onException; if (string.IsNullOrEmpty(name)) { StackTrace stackTrace = new StackTrace(); // get call stack name = stackTrace.GetFrames().Skip(2).Take(1).Select(x => x.GetMethod().DeclaringType.Name + " :: " + x.GetMethod().Name).First(); } Response = new OperationResponse() { Name = name }; }
public Processor SetResponse(OperationResponse response) { this.Response = response; return this; }