NClass.Core.InterfaceType.AddBase C# (CSharp) Method

AddBase() private method

/// The language of does not equal.-or- /// is earlier added base.-or- /// is descendant of the interface. /// /// is null. ///
private AddBase ( InterfaceType _base ) : void
_base InterfaceType
return void
		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();
		}