public Substitution Clone()
 {
     SubstitutionRule[] sr = new SubstitutionRule[this.SubRule.Length];
     for (int i = 0; i < this.SubRule.Length; i++)
     {
         sr[i] = this.SubRule[i] == null ? null : this.SubRule[i].Clone();
     }
     return(new Substitution()
     {
         Delimiter = this.Delimiter,
         StartYear = this.StartYear,
         RuleNumber = this.RuleNumber,
         SubRule = sr
     });
 }
Exemple #2
0
 public Substitution Copy()
 {
     SubstitutionRule[] sr = new SubstitutionRule[this.SubRule.Length];
     for (int i = 0; i < this.SubRule.Length; i++)
     {
         sr[i] = this.SubRule[i].Copy();
     }
     return(new Substitution()
     {
         Delimiter = string.Copy(this.Delimiter),
         StartYear = this.StartYear,
         RuleNumber = this.RuleNumber,
         SubRule = sr
     });
 }