public Ymnos(Ymnos source) { if (source == null) { throw new ArgumentNullException("Ymnos"); } //ElementName = string.Copy(source.ElementName); source.Stihoi.ForEach(c => Stihoi.Add(new ItemText(c))); Text = new ItemText(source.Text); Kind = source.Kind; Annotation = (source.Annotation != null) ? new ItemText(source.Annotation) : null; }
protected override void Validate() { if (Text == null || Text.IsEmpty == true) { AddBrokenConstraint(YmnosBusinessConstraint.TextRequired); } else if (!Text.IsValid) { AppendAllBrokenConstraints(Text, ElementConstants.YmnosTextNode); } if (Stihoi != null) { Stihoi.ForEach(c => { if (!c.IsValid) { AppendAllBrokenConstraints(c, ElementConstants.YmnosStihosNode); } }); } }