/// <summary> /// Removes the given item from the collection /// </summary> /// <returns>True, if the item was removed, otherwise False</returns> /// <param name="item">The item that should be removed</param> public override bool Remove(IModelElement item) { IETypeParameter eTypeParameterItem = item.As <IETypeParameter>(); if (((eTypeParameterItem != null) && this._parent.ETypeParameters.Remove(eTypeParameterItem))) { return(true); } IEParameter eParameterItem = item.As <IEParameter>(); if (((eParameterItem != null) && this._parent.EParameters.Remove(eParameterItem))) { return(true); } IEGenericType eGenericTypeItem = item.As <IEGenericType>(); if (((eGenericTypeItem != null) && this._parent.EGenericExceptions.Remove(eGenericTypeItem))) { return(true); } return(false); }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IEParameter eParametersCasted = item.As <IEParameter>(); if ((eParametersCasted != null)) { this._parent.EParameters.Add(eParametersCasted); } }
/// <summary> /// Removes the given item from the collection /// </summary> /// <returns>True, if the item was removed, otherwise False</returns> /// <param name="item">The item that should be removed</param> public override bool Remove(IModelElement item) { IEParameter eParameterItem = item.As <IEParameter>(); if (((eParameterItem != null) && this._parent.EParameters.Remove(eParameterItem))) { return(true); } return(false); }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IETypeParameter eTypeParametersCasted = item.As <IETypeParameter>(); if ((eTypeParametersCasted != null)) { this._parent.ETypeParameters.Add(eTypeParametersCasted); } IEParameter eParametersCasted = item.As <IEParameter>(); if ((eParametersCasted != null)) { this._parent.EParameters.Add(eParametersCasted); } IEGenericType eGenericExceptionsCasted = item.As <IEGenericType>(); if ((eGenericExceptionsCasted != null)) { this._parent.EGenericExceptions.Add(eGenericExceptionsCasted); } }
/// <summary> /// Removes the given item from the collection /// </summary> /// <returns>True, if the item was removed, otherwise False</returns> /// <param name="item">The item that should be removed</param> public override bool Remove(IModelElement item) { if ((this._parent.EContainingClass == item)) { this._parent.EContainingClass = null; return(true); } IEParameter eParameterItem = item.As <IEParameter>(); if (((eParameterItem != null) && this._parent.EParameters.Remove(eParameterItem))) { return(true); } IEClassifier eClassifierItem = item.As <IEClassifier>(); if (((eClassifierItem != null) && this._parent.EExceptions.Remove(eClassifierItem))) { return(true); } return(false); }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { if ((this._parent.EContainingClass == null)) { IEClass eContainingClassCasted = item.As <IEClass>(); if ((eContainingClassCasted != null)) { this._parent.EContainingClass = eContainingClassCasted; return; } } IETypeParameter eTypeParametersCasted = item.As <IETypeParameter>(); if ((eTypeParametersCasted != null)) { this._parent.ETypeParameters.Add(eTypeParametersCasted); } IEParameter eParametersCasted = item.As <IEParameter>(); if ((eParametersCasted != null)) { this._parent.EParameters.Add(eParametersCasted); } IEClassifier eExceptionsCasted = item.As <IEClassifier>(); if ((eExceptionsCasted != null)) { this._parent.EExceptions.Add(eExceptionsCasted); } IEGenericType eGenericExceptionsCasted = item.As <IEGenericType>(); if ((eGenericExceptionsCasted != null)) { this._parent.EGenericExceptions.Add(eGenericExceptionsCasted); } }