public object Get(GetSupportedIndicators request) { var response = new GetSupportedIndicatorsResponse(); try { var result = (from object x in Enum.GetValues(typeof(IndicatorType)) select x.ToString()).ToList(); if (result.Any()) { response.Success = true; response.Data = result; } else { response.ResponseStatus = new ResponseStatus(string.Empty, "Error"); } } catch (Exception ex) { var status = new ResponseStatus(); status.Message = ex.Message; status.ErrorCode = ex.Source; status.StackTrace = ex.StackTrace; response.ResponseStatus = status; } return(response); }
public object Get(GetSupportedIndicators request) { var response = new GetSupportedIndicatorsResponse(); try { var result = (from object x in Enum.GetValues(typeof (IndicatorType)) select x.ToString()).ToList(); if (result.Any()) { response.Success = true; response.Data = result; } else { response.ResponseStatus = new ResponseStatus(string.Empty, "Error"); } } catch (Exception ex) { var status = new ResponseStatus(); status.Message = ex.Message; status.ErrorCode = ex.Source; status.StackTrace = ex.StackTrace; response.ResponseStatus = status; } return response; }