public void Render(ITableBuilder tableBuilder, object model, RenderingTemplate template) { if (!(model is string stringToRender)) { throw new ArgumentException("model is not string"); } tableBuilder.RenderAtomicValue(stringToRender); tableBuilder.SetCurrentStyle(); tableBuilder.MoveToNextColumn(); }
private void RenderFormControl(ITableBuilder tableBuilder, object model, ICell cell) { var childModel = StrictExtractChildModel(model, cell); if (childModel != null) { var(controlType, controlName) = TemplateDescriptionHelper.TryGetFormControlFromValueDescription(cell.StringValue); var renderer = rendererCollection.GetFormControlRenderer(controlType, childModel.GetType()); renderer.Render(tableBuilder, controlName, childModel); } tableBuilder.SetCurrentStyle(); tableBuilder.MoveToNextColumn(); }
public void Render(ITableBuilder tableBuilder, object model, RenderingTemplate template) { if (!(model is double)) { throw new ArgumentException("model is not double"); } var doubleToRender = (double)model; tableBuilder.RenderAtomicValue(doubleToRender); tableBuilder.SetCurrentStyle(); tableBuilder.MoveToNextColumn(); }