public ReportSize this[int index] { get { ReportSize reportSize; ReportSizeCollection reportSizeCollection; if (index >= 0 && index < this.Count) { reportSize = null; if (this.m_reportSizeCollection != null && this.m_reportSizeCollection[index] != null) { reportSize = this.m_reportSizeCollection[index]; } if (reportSize == null) { AspNetCore.ReportingServices.ReportProcessing.Matrix matrix = (AspNetCore.ReportingServices.ReportProcessing.Matrix) this.m_owner.ReportItemDef; MatrixInstance matrixInstance = (MatrixInstance)this.m_owner.ReportItemInstance; reportSizeCollection = null; reportSizeCollection = ((!this.m_widthsCollection) ? matrix.CellHeightsForRendering : matrix.CellWidthsForRendering); Global.Tracer.Assert(null != reportSizeCollection); if (this.m_owner.NoRows || matrixInstance == null || matrixInstance.Cells.Count == 0) { reportSize = reportSizeCollection[index]; } else { if (this.m_widthsCollection && matrix.StaticColumns == null) { goto IL_0107; } if (!this.m_widthsCollection && matrix.StaticRows == null) { goto IL_0107; } bool cacheState = this.m_owner.RenderingContext.CacheState; this.m_owner.RenderingContext.CacheState = true; MatrixCellCollection cellCollection = this.m_owner.CellCollection; MatrixCell matrixCell = null; matrixCell = ((!this.m_widthsCollection) ? cellCollection[index, 0] : cellCollection[0, index]); reportSize = reportSizeCollection[matrixCell.ColumnIndex]; this.m_owner.RenderingContext.CacheState = cacheState; } goto IL_0184; } goto IL_01bc; } throw new RenderingObjectModelException(ProcessingErrorCode.rsInvalidParameterRange, index, 0, this.Count); IL_01bc: return(reportSize); IL_0107: reportSize = reportSizeCollection[0]; goto IL_0184; IL_0184: if (this.m_owner.RenderingContext.CacheState) { if (this.m_reportSizeCollection == null) { this.m_reportSizeCollection = new ReportSizeCollection(this.Count); } this.m_reportSizeCollection[index] = reportSize; } goto IL_01bc; } }
public MatrixCell this[int row, int column] { get { if (row >= 0 && row < this.m_rowsCount) { if (column >= 0 && column < this.m_columnsCount) { MatrixCell matrixCell = null; if (row == 0 && column == 0) { matrixCell = this.m_firstCell; } else if (row == 0) { if (this.m_firstMatrixRowCells != null) { matrixCell = this.m_firstMatrixRowCells[column - 1]; } } else if (column == 0) { if (this.m_firstMatrixColumnCells != null) { matrixCell = this.m_firstMatrixColumnCells[row - 1]; } } else if (this.m_cells != null && this.m_cells[row - 1] != null) { matrixCell = this.m_cells[row - 1][column - 1]; } if (matrixCell == null) { matrixCell = new MatrixCell(this.m_owner, row, column); if (this.m_owner.RenderingContext.CacheState) { if (row == 0 && column == 0) { this.m_firstCell = matrixCell; } else if (row == 0) { if (this.m_firstMatrixRowCells == null) { this.m_firstMatrixRowCells = new MatrixRowCells(this.m_columnsCount - 1); } this.m_firstMatrixRowCells[column - 1] = matrixCell; } else if (column == 0) { if (this.m_firstMatrixColumnCells == null) { this.m_firstMatrixColumnCells = new MatrixRowCells(this.m_rowsCount - 1); } this.m_firstMatrixColumnCells[row - 1] = matrixCell; } else { if (this.m_cells == null) { this.m_cells = new MatrixRowCells[this.m_rowsCount - 1]; } if (this.m_cells[row - 1] == null) { this.m_cells[row - 1] = new MatrixRowCells(this.m_columnsCount - 1); } this.m_cells[row - 1][column - 1] = matrixCell; } } } return(matrixCell); } throw new RenderingObjectModelException(ProcessingErrorCode.rsInvalidParameterRange, column, 0, this.m_columnsCount); } throw new RenderingObjectModelException(ProcessingErrorCode.rsInvalidParameterRange, row, 0, this.m_rowsCount); } }