public TradeReport runReport(ReportCalculationResults results, TradeReportTemplate reportTemplate) { //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: com.google.common.collect.ImmutableTable.Builder<int, int, com.opengamma.strata.collect.result.Result<?>> resultTable = com.google.common.collect.ImmutableTable.builder(); ImmutableTable.Builder <int, int, Result <object> > resultTable = ImmutableTable.builder(); for (int reportColumnIdx = 0; reportColumnIdx < reportTemplate.Columns.Count; reportColumnIdx++) { TradeReportColumn reportColumn = reportTemplate.Columns[reportColumnIdx]; //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: java.util.List<com.opengamma.strata.collect.result.Result<?>> columnResults; IList <Result <object> > columnResults; if (reportColumn.Value.Present) { columnResults = ValuePathEvaluator.evaluate(reportColumn.Value.get(), results); } else { columnResults = IntStream.range(0, results.Targets.Count).mapToObj(i => Result.failure(FailureReason.INVALID, "No value specified in report template")).collect(toImmutableList()); } int rowCount = results.CalculationResults.RowCount; for (int rowIdx = 0; rowIdx < rowCount; rowIdx++) { resultTable.put(rowIdx, reportColumnIdx, columnResults[rowIdx]); } } return(TradeReport.builder().runInstant(Instant.now()).valuationDate(results.ValuationDate).columns(reportTemplate.Columns).data(resultTable.build()).build()); }
private TradeReport report <T1>(ArrayTable <T1> table) { return(TradeReport.builder().columns(TradeReportColumn.builder().header("col0").build(), TradeReportColumn.builder().header("col1").build()).data(table).valuationDate(LocalDate.now(ZoneOffset.UTC)).runInstant(Instant.now()).build()); }