/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { ICompatibleUnit compatibleUnitsCasted = item.As <ICompatibleUnit>(); if ((compatibleUnitsCasted != null)) { this._parent.CompatibleUnits.Add(compatibleUnitsCasted); } if ((this._parent.Status == null)) { IStatus statusCasted = item.As <IStatus>(); if ((statusCasted != null)) { this._parent.Status = statusCasted; return; } } if ((this._parent.TypeMaterial == null)) { ITypeMaterial typeMaterialCasted = item.As <ITypeMaterial>(); if ((typeMaterialCasted != null)) { this._parent.TypeMaterial = typeMaterialCasted; return; } } IPropertyUnit propertyUnitsCasted = item.As <IPropertyUnit>(); if ((propertyUnitsCasted != null)) { this._parent.PropertyUnits.Add(propertyUnitsCasted); } }
/// <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; } } if ((this._parent.TypeMaterial == null)) { ITypeMaterial typeMaterialCasted = item.As <ITypeMaterial>(); if ((typeMaterialCasted != null)) { this._parent.TypeMaterial = typeMaterialCasted; return; } } if ((this._parent.TypeAsset == null)) { ITypeAsset typeAssetCasted = item.As <ITypeAsset>(); if ((typeAssetCasted != null)) { this._parent.TypeAsset = typeAssetCasted; return; } } }