/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IReportingGroup reportingGroupCasted = item.As <IReportingGroup>(); if ((reportingGroupCasted != null)) { this._parent.ReportingGroup.Add(reportingGroupCasted); } }
/// <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) { IReportingGroup reportingGroupItem = item.As <IReportingGroup>(); if (((reportingGroupItem != null) && this._parent.ReportingGroup.Remove(reportingGroupItem))) { 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.ReportingGroup == null)) { IReportingGroup reportingGroupCasted = item.As <IReportingGroup>(); if ((reportingGroupCasted != null)) { this._parent.ReportingGroup = reportingGroupCasted; return; } } IConnectivityNode connectivityNodeCasted = item.As <IConnectivityNode>(); if ((connectivityNodeCasted != null)) { this._parent.ConnectivityNode.Add(connectivityNodeCasted); } }