/// <exception cref="RelationException"> /// The language of <paramref name="_base"/> does not equal.-or- /// <paramref name="_base"/> is earlier added base.-or- /// <paramref name="_base"/> is descendant of the interface. /// </exception> /// <exception cref="ArgumentNullException"> /// <paramref name="_base"/> is null. /// </exception> internal void AddBase(InterfaceType _base) { if (_base == null) { throw new ArgumentNullException("_base"); } if (BaseList.Contains(_base)) { throw new RelationException( Strings.GetString("error_cannot_add_same_base_interface")); } if (_base.IsAncestor(this)) { throw new RelationException(Strings.GetString("error_cyclic_base", Strings.GetString("interface"))); } if (_base.Language != this.Language) { throw new RelationException(Strings.GetString("error_languages_do_not_equal")); } BaseList.Add(_base); Modified(); }
/// <exception cref="RelationshipException"> /// The language of <paramref name="_base" /> does not equal.-or- /// <paramref name="_base" /> is earlier added base.-or- /// <paramref name="_base" /> is descendant of the interface. /// </exception> /// <exception cref="ArgumentNullException"> /// <paramref name="_base" /> is null. /// </exception> internal void AddBase(InterfaceType _base) { if (_base == null) { throw new ArgumentNullException("_base"); } if (BaseList.Contains(_base)) { throw new RelationshipException( Strings.ErrorCannotAddSameBaseInterface); } if (_base.IsAncestor(this)) { throw new RelationshipException(string.Format(Strings.ErrorCyclicBase, Strings.Interface)); } if (_base.Language != Language) { throw new RelationshipException(Strings.ErrorLanguagesDoNotEqual); } BaseList.Add(_base); Changed(); }
/// <exception cref="ArgumentException"> /// The language of <paramref name="_base"/> does not equal.-or- /// <paramref name="_base"/> is earlier added base.-or- /// <paramref name="_base"/> is descendant of the interface. /// </exception> /// <exception cref="ArgumentNullException"> /// <paramref name="_base"/> is null. /// </exception> internal void AddBase(InterfaceType _base) { if (_base == null) { throw new ArgumentNullException("_base"); } if (BaseList.Contains(_base)) { throw new ArgumentException("error_cannot_add_same_base_interface"); } if (_base.IsAncestor(this)) { throw new ArgumentException("interface"); } if (_base.Language != this.Language) { throw new ArgumentException("error_languages_do_not_equal"); } BaseList.Add(_base); }
/// <exception cref="RelationshipException"> /// The language of <paramref name="_base"/> does not equal.-or- /// <paramref name="_base"/> is earlier added base.-or- /// <paramref name="_base"/> is descendant of the interface. /// </exception> /// <exception cref="ArgumentNullException"> /// <paramref name="_base"/> is null. /// </exception> internal void AddBase(InterfaceType _base) { if (_base == null) throw new ArgumentNullException("_base"); if (BaseList.Contains(_base)) { throw new RelationshipException( Strings.ErrorCannotAddSameBaseInterface); } if (_base.IsAncestor(this)) { throw new RelationshipException(string.Format(Strings.ErrorCyclicBase, Strings.Interface)); } if (_base.Language != this.Language) throw new RelationshipException(Strings.ErrorLanguagesDoNotEqual); BaseList.Add(_base); Changed(); }