public override IPalasoDataObjectProperty Clone() { var clone = new LexField(Type); clone.Traits = new List <LexTrait>(Traits.Select(t => t.Clone())); //copied directly from MultiText.Clone as we unfortunately can't just call that method and have it do the right thing. //If this class were composed of a multitext rather than inheriting this wouldn't be a problem. clone.EmbeddedXmlElements = new List <string>(EmbeddedXmlElements); clone.Forms = Forms.Select(f => (LanguageForm)f.Clone()).ToArray(); return(clone); }
public bool Equals(LexField other) { if (!base.Equals(other)) { return(false); } if (!Type.Equals(other.Type)) { return(false); } if (!Traits.SequenceEqual(other.Traits)) { return(false); } return(true); }