public bool Equals(LanguageForm other) { if (other == null) { return(false); } if (!IsStarred.Equals(other.IsStarred)) { return(false); } if ((WritingSystemId != null && !WritingSystemId.Equals(other.WritingSystemId)) || (other.WritingSystemId != null && !other.WritingSystemId.Equals(WritingSystemId))) { return(false); } if ((Form != null && !Form.Equals(other.Form)) || (other.Form != null && !other.Form.Equals(Form))) { return(false); } if ((_annotation != null && !_annotation.Equals(other._annotation)) || (other._annotation != null && !other._annotation.Equals(_annotation))) { return(false); } if (_spans != other.Spans) { if (_spans == null || other.Spans == null || _spans.Count != other.Spans.Count) { return(false); } for (int i = 0; i < _spans.Count; ++i) { if (!_spans[i].Equals(other.Spans[i])) { return(false); } } } return(true); }
comparer = StringComparer.Create(CultureInfo.GetCultureInfo(WritingSystemId), false);