public HtmlBuilderTableTag(HtmlBuilder b, TableAttrib attrib) { if (attrib != null) { int?columnCount = attrib.ColumnCount; ColumnCount = (columnCount != null ? columnCount.Value : 0); NullTdBody = attrib.NullTdBody; int?rowPitch = attrib.RowPitch; RowPitch = (rowPitch != null ? rowPitch.Value : 1); int?columnPitch = attrib.ColumnPitch; ColumnPitch = (columnPitch != null ? columnPitch.Value : 1); SelectedClass = attrib.SelectedClass; SelectedStyle = attrib.SelectedStyle; AlternateClass = attrib.AlternateClass; AlternateStyle = attrib.AlternateStyle; TableTrCloseMethod?trCloseMethod = attrib.TrCloseMethod; TrCloseMethod = (trCloseMethod != null ? trCloseMethod.Value : TableTrCloseMethod.Undefined); TableAlternateOrientation?alternateOrientation = attrib.AlternateOrientation; AlternateOrientation = (alternateOrientation != null ? alternateOrientation.Value : TableAlternateOrientation.Row); } else { ColumnCount = 0; NullTdBody = string.Empty; RowPitch = 1; ColumnPitch = 1; SelectedClass = string.Empty; SelectedStyle = string.Empty; AlternateClass = string.Empty; AlternateStyle = string.Empty; TrCloseMethod = TableTrCloseMethod.Undefined; AlternateOrientation = TableAlternateOrientation.Row; } }
/// <summary> /// Initializes a new instance of the <see cref="HtmlBuilderTableTag"/> class. /// </summary> /// <param name="b">The b.</param> /// <param name="attrib">The attrib.</param> public HtmlBuilderTableTag(HtmlBuilder b, TableAttrib attrib) { if (attrib != null) { int? columnCount = attrib.ColumnCount; ColumnCount = (columnCount != null ? columnCount.Value : 0); NullTdBody = attrib.NullTdBody; int? rowPitch = attrib.RowPitch; RowPitch = (rowPitch != null ? rowPitch.Value : 1); int? columnPitch = attrib.ColumnPitch; ColumnPitch = (columnPitch != null ? columnPitch.Value : 1); SelectedClass = attrib.SelectedClass; SelectedStyle = attrib.SelectedStyle; AlternateClass = attrib.AlternateClass; AlternateStyle = attrib.AlternateStyle; TableTrCloseMethod? trCloseMethod = attrib.TrCloseMethod; TrCloseMethod = (trCloseMethod != null ? trCloseMethod.Value : TableTrCloseMethod.Undefined); TableAlternateOrientation? alternateOrientation = attrib.AlternateOrientation; AlternateOrientation = (alternateOrientation != null ? alternateOrientation.Value : TableAlternateOrientation.Row); } else { ColumnCount = 0; NullTdBody = string.Empty; RowPitch = 1; ColumnPitch = 1; SelectedClass = string.Empty; SelectedStyle = string.Empty; AlternateClass = string.Empty; AlternateStyle = string.Empty; TrCloseMethod = TableTrCloseMethod.Undefined; AlternateOrientation = TableAlternateOrientation.Row; } }