private IPoProvider GetPoProvider(ReportParameter poProviderParameter) { IPoProvider poProvider; if (!poProviderIndex.TryGetValue(poProviderParameter.GetType(), out poProvider)) { throw new ArgumentException("For the Report-Parameter " + poProviderParameter.GetType().FullName + " was no PoProvider registered."); } return(poProvider); }
public async Task OnGet([FromQuery] ReportParameter parameters) { var request = new RestRequest("?/DtTest/TestReport"); foreach (var parameterInfo in parameters.GetType().GetProperties()) { var value = parameterInfo.GetValue(parameters); request.AddParameter(parameterInfo.Name, value, ParameterType.QueryString); } var bytes = await _reportService.Execute(request); ReportValue = Encoding.Default.GetString(bytes); }