/// <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) { ISpecification specificationItem = item.As <ISpecification>(); if (((specificationItem != null) && this._parent.Specifications.Remove(specificationItem))) { return(true); } IWorkTask workTaskItem = item.As <IWorkTask>(); if (((workTaskItem != null) && this._parent.WorkTasks.Remove(workTaskItem))) { return(true); } ICULaborItem cULaborItemItem = item.As <ICULaborItem>(); if (((cULaborItemItem != null) && this._parent.CULaborItems.Remove(cULaborItemItem))) { return(true); } ISkill skillItem = item.As <ISkill>(); if (((skillItem != null) && this._parent.Skills.Remove(skillItem))) { 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) { ISpecification specificationsCasted = item.As <ISpecification>(); if ((specificationsCasted != null)) { this._parent.Specifications.Add(specificationsCasted); } IWorkTask workTasksCasted = item.As <IWorkTask>(); if ((workTasksCasted != null)) { this._parent.WorkTasks.Add(workTasksCasted); } ICULaborItem cULaborItemsCasted = item.As <ICULaborItem>(); if ((cULaborItemsCasted != null)) { this._parent.CULaborItems.Add(cULaborItemsCasted); } ISkill skillsCasted = item.As <ISkill>(); if ((skillsCasted != null)) { this._parent.Skills.Add(skillsCasted); } }
/// <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.Status == item)) { this._parent.Status = null; return(true); } ICULaborItem cULaborItemItem = item.As <ICULaborItem>(); if (((cULaborItemItem != null) && this._parent.CULaborItems.Remove(cULaborItemItem))) { 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.Status == null)) { IStatus statusCasted = item.As <IStatus>(); if ((statusCasted != null)) { this._parent.Status = statusCasted; return; } } ICULaborItem cULaborItemsCasted = item.As <ICULaborItem>(); if ((cULaborItemsCasted != null)) { this._parent.CULaborItems.Add(cULaborItemsCasted); } }