internal SLTable Clone() { var t = new SLTable(); t.IsNewTable = IsNewTable; t.RelationshipID = RelationshipID; t.HasAutoFilter = HasAutoFilter; t.AutoFilter = AutoFilter.Clone(); t.HasSortState = HasSortState; t.SortState = SortState.Clone(); t.TableColumns = new List <SLTableColumn>(); for (var i = 0; i < TableColumns.Count; ++i) { t.TableColumns.Add(TableColumns[i].Clone()); } t.TableNames = new HashSet <string>(); foreach (var s in TableNames) { t.TableNames.Add(s); } t.HasTableStyleInfo = HasTableStyleInfo; t.TableStyleInfo = TableStyleInfo.Clone(); t.Id = Id; t.Name = Name; t.sDisplayName = sDisplayName; t.Comment = Comment; t.StartRowIndex = StartRowIndex; t.StartColumnIndex = StartColumnIndex; t.EndRowIndex = EndRowIndex; t.EndColumnIndex = EndColumnIndex; t.HasTableType = HasTableType; t.vTableType = vTableType; t.HeaderRowCount = HeaderRowCount; t.InsertRow = InsertRow; t.InsertRowShift = InsertRowShift; t.TotalsRowCount = TotalsRowCount; t.TotalsRowShown = TotalsRowShown; t.Published = Published; t.HeaderRowFormatId = HeaderRowFormatId; t.DataFormatId = DataFormatId; t.TotalsRowFormatId = TotalsRowFormatId; t.HeaderRowBorderFormatId = HeaderRowBorderFormatId; t.BorderFormatId = BorderFormatId; t.TotalsRowBorderFormatId = TotalsRowBorderFormatId; t.HeaderRowCellStyle = HeaderRowCellStyle; t.DataCellStyle = DataCellStyle; t.TotalsRowCellStyle = TotalsRowCellStyle; t.ConnectionId = ConnectionId; return(t); }
internal SLAutoFilter Clone() { var af = new SLAutoFilter(); af.FilterColumns = new List <SLFilterColumn>(); for (var i = 0; i < FilterColumns.Count; ++i) { af.FilterColumns.Add(FilterColumns[i].Clone()); } af.HasSortState = HasSortState; af.SortState = SortState.Clone(); af.StartRowIndex = StartRowIndex; af.StartColumnIndex = StartColumnIndex; af.EndRowIndex = EndRowIndex; af.EndColumnIndex = EndColumnIndex; return(af); }