public override Object Clone() { CFRuleRecord rec = new CFRuleRecord(field_1_condition_type, (ComparisonOperator)field_2_comparison_operator); rec.field_5_options = field_5_options; rec.field_6_not_used = field_6_not_used; if (ContainsFontFormattingBlock) { rec.fontFormatting = (FontFormatting)fontFormatting.Clone(); } if (ContainsBorderFormattingBlock) { rec.borderFormatting = (BorderFormatting)borderFormatting.Clone(); } if (ContainsPatternFormattingBlock) { rec.patternFormatting = (PatternFormatting)patternFormatting.Clone(); } if (field_17_formula1 != null) { rec.field_17_formula1 = field_17_formula1.Copy(); } if (field_18_formula2 != null) { rec.field_18_formula2 = field_18_formula2.Copy(); } return(rec); }
protected void CopyTo(CFRuleBase rec) { rec.condition_type = condition_type; rec.comparison_operator = comparison_operator; rec.formatting_options = formatting_options; rec.formatting_not_used = formatting_not_used; if (ContainsFontFormattingBlock) { rec._fontFormatting = (FontFormatting)_fontFormatting.Clone(); } if (ContainsBorderFormattingBlock) { rec._borderFormatting = (BorderFormatting)_borderFormatting.Clone(); } if (ContainsPatternFormattingBlock) { rec._patternFormatting = (PatternFormatting)_patternFormatting.Clone(); } rec.formula1 = (formula1.Copy()); rec.formula2 = (formula2.Copy()); }