/// <summary> /// Initializes a new instance of the <see cref="DocumentContext"/> class. /// </summary> /// <param name="document">Excel document.</param> /// <param name="documentMetadata">Document configuration metadata.</param> public DocumentContext(SpreadsheetDocument document, IExcelMetadata documentMetadata) { document.AssertArgumentNotNull(nameof(document)); documentMetadata.AssertArgumentNotNull(nameof(documentMetadata)); Document = document; DocumentMetadata = documentMetadata; }
/// <summary> /// Initializes a new instance of the <see cref="ColumnContext"/> class. /// </summary> /// <param name="sheetContext">Owner sheet context.</param> /// <param name="columnMetadata">Column metadata.</param> /// <param name="propertyRenderer"><see cref="IPropertyRenderer"/> to render column cells.</param> public ColumnContext( SheetContext sheetContext, IExcelMetadata columnMetadata, IPropertyRenderer propertyRenderer) { SheetContext = sheetContext.AssertArgumentNotNull(nameof(sheetContext)); ColumnMetadata = columnMetadata.AssertArgumentNotNull(nameof(columnMetadata)); PropertyRenderer = propertyRenderer.AssertArgumentNotNull(nameof(propertyRenderer)); }
/// <summary> /// Initializes a new instance of the <see cref="SheetContext"/> class. /// </summary> /// <param name="documentContext">Document context.</param> /// <param name="worksheetPart">WorksheetPart.</param> /// <param name="sheetMetadata">Sheet configuration metadata.</param> /// <param name="reportRenderer">Renderer for sheet.</param> public SheetContext( DocumentContext documentContext, WorksheetPart worksheetPart, IExcelMetadata sheetMetadata, IReportRenderer reportRenderer) { DocumentContext = documentContext.AssertArgumentNotNull(nameof(documentContext)); WorksheetPart = worksheetPart.AssertArgumentNotNull(nameof(worksheetPart)); SheetMetadata = sheetMetadata.AssertArgumentNotNull(nameof(sheetMetadata)); ReportRenderer = reportRenderer.AssertArgumentNotNull(nameof(reportRenderer)); }
public CellContext(ColumnContext columnContext, IExcelMetadata cellMetadata, Cell cell) { ColumnContext = columnContext.AssertArgumentNotNull(nameof(columnContext)); CellMetadata = cellMetadata.AssertArgumentNotNull(nameof(cellMetadata)); Cell = cell; }