/// <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) { IDesignLocation designLocationItem = item.As <IDesignLocation>(); if (((designLocationItem != null) && this._parent.DesignLocations.Remove(designLocationItem))) { return(true); } IDesignLocationCU designLocationCUItem = item.As <IDesignLocationCU>(); if (((designLocationCUItem != null) && this._parent.DesignLocationCUs.Remove(designLocationCUItem))) { return(true); } IDesign designItem = item.As <IDesign>(); if (((designItem != null) && this._parent.Designs.Remove(designItem))) { return(true); } if ((this._parent.Status == item)) { this._parent.Status = null; 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) { IDesignLocation designLocationsCasted = item.As <IDesignLocation>(); if ((designLocationsCasted != null)) { this._parent.DesignLocations.Add(designLocationsCasted); } IDesignLocationCU designLocationCUsCasted = item.As <IDesignLocationCU>(); if ((designLocationCUsCasted != null)) { this._parent.DesignLocationCUs.Add(designLocationCUsCasted); } IDesign designsCasted = item.As <IDesign>(); if ((designsCasted != null)) { this._parent.Designs.Add(designsCasted); } if ((this._parent.Status == null)) { IStatus statusCasted = item.As <IStatus>(); if ((statusCasted != null)) { this._parent.Status = statusCasted; 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.DesignLocation == null)) { IDesignLocation designLocationCasted = item.As <IDesignLocation>(); if ((designLocationCasted != null)) { this._parent.DesignLocation = designLocationCasted; return; } } if ((this._parent.ErpBOM == null)) { IErpBOM erpBOMCasted = item.As <IErpBOM>(); if ((erpBOMCasted != null)) { this._parent.ErpBOM = erpBOMCasted; return; } } if ((this._parent.TypeAsset == null)) { ITypeAsset typeAssetCasted = item.As <ITypeAsset>(); if ((typeAssetCasted != null)) { this._parent.TypeAsset = typeAssetCasted; 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) { IDesignLocation designLocationItem = item.As <IDesignLocation>(); if (((designLocationItem != null) && this._parent.DesignLocations.Remove(designLocationItem))) { return(true); } if ((this._parent.OneCallRequest == item)) { this._parent.OneCallRequest = null; 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) { IDesignLocation designLocationsCasted = item.As <IDesignLocation>(); if ((designLocationsCasted != null)) { this._parent.DesignLocations.Add(designLocationsCasted); } if ((this._parent.OneCallRequest == null)) { IOneCallRequest oneCallRequestCasted = item.As <IOneCallRequest>(); if ((oneCallRequestCasted != null)) { this._parent.OneCallRequest = oneCallRequestCasted; 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.CoordinateSystem == item)) { this._parent.CoordinateSystem = null; return(true); } IGmlDiagramObject gmlDiagramObjectItem = item.As <IGmlDiagramObject>(); if (((gmlDiagramObjectItem != null) && this._parent.GmlDiagramObjects.Remove(gmlDiagramObjectItem))) { return(true); } IDesignLocation designLocationItem = item.As <IDesignLocation>(); if (((designLocationItem != null) && this._parent.DesignLocations.Remove(designLocationItem))) { 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.CoordinateSystem == null)) { ICoordinateSystem coordinateSystemCasted = item.As <ICoordinateSystem>(); if ((coordinateSystemCasted != null)) { this._parent.CoordinateSystem = coordinateSystemCasted; return; } } IGmlDiagramObject gmlDiagramObjectsCasted = item.As <IGmlDiagramObject>(); if ((gmlDiagramObjectsCasted != null)) { this._parent.GmlDiagramObjects.Add(gmlDiagramObjectsCasted); } IDesignLocation designLocationsCasted = item.As <IDesignLocation>(); if ((designLocationsCasted != null)) { this._parent.DesignLocations.Add(designLocationsCasted); } }