/// <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.EOpposite == null)) { IEReference eOppositeCasted = item.As <IEReference>(); if ((eOppositeCasted != null)) { this._parent.EOpposite = eOppositeCasted; return; } } IEAttribute eKeysCasted = item.As <IEAttribute>(); if ((eKeysCasted != null)) { this._parent.EKeys.Add(eKeysCasted); } if ((this._parent.Refines == null)) { IEReference refinesCasted = item.As <IEReference>(); if ((refinesCasted != null)) { this._parent.Refines = refinesCasted; return; } } }
/// <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.Refines == null)) { IEAttribute refinesCasted = item.As <IEAttribute>(); if ((refinesCasted != null)) { this._parent.Refines = refinesCasted; return; } } }
/// <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.EOpposite == item)) { this._parent.EOpposite = null; return(true); } IEAttribute eAttributeItem = item.As <IEAttribute>(); if (((eAttributeItem != null) && this._parent.EKeys.Remove(eAttributeItem))) { return(true); } return(false); }
/// <summary> /// Creates a new observable property access proxy /// </summary> /// <param name="modelElement">The model instance element for which to create the property access proxy</param> public IDProxy(IEAttribute modelElement) : base(modelElement, "iD") { }