public void Merge(FinanceReportCell cell) { if (Type == CellType.NotApplicable) { Copy(cell); } else { if (cell.Type == CellType.NotApplicable) { return; } Copy(cell); } }
public FinanceReportRow(string name, ICollection <FinanceReportColumnDefinition> columnDefinitions, decimal defaultUnit) { if (columnDefinitions == null || columnDefinitions.Count == 0) { throw new ArgumentNullException("columnDefinitions"); } _cells = new FinanceReportCell[columnDefinitions.Count]; for (var i = 0; i < _cells.Length; ++i) { _cells[i] = new FinanceReportCell(); } string cleanedName; decimal unit; FinanceReportHelper.ParseDefinitionAndUnit(name, defaultUnit, out cleanedName, out unit); Unit = unit; Name = cleanedName; }
public void Copy(FinanceReportCell cell) { Type = cell.Type; _value = cell._value; }