MetricSearchResponseDTO GetResponseResult(MetricSearchArgs searchCondition) { MetricSearchResponseDTO result = null; switch (searchCondition.MetricType) { case MetricType.Meters: result = logic.GetMeterList(searchCondition.ToDTO()); break; case MetricType.Histograms: result = logic.GetHistogramList(searchCondition.ToDTO()); break; } return(result); }
public JsonResult Search(MetricSearchArgs searchCondition) { MetricSearchResponseDTO result = null; switch (searchCondition.MetricType) { case MetricType.Meters: result = logic.GetMeterList(searchCondition.ToDTO()); break; case MetricType.Histograms: result = logic.GetHistogramList(searchCondition.ToDTO()); break; } return(Json(result, JsonRequestBehavior.AllowGet)); }