Example #1
0
            /// <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)
            {
                ILimit limitItem = item.As <ILimit>();

                if (((limitItem != null) &&
                     this._parent.Limits.Remove(limitItem)))
                {
                    return(true);
                }
                ICompatibleUnit compatibleUnitItem = item.As <ICompatibleUnit>();

                if (((compatibleUnitItem != null) &&
                     this._parent.CompatibleUnits.Remove(compatibleUnitItem)))
                {
                    return(true);
                }
                IProcedureDataSet procedureDataSetItem = item.As <IProcedureDataSet>();

                if (((procedureDataSetItem != null) &&
                     this._parent.ProcedureDataSets.Remove(procedureDataSetItem)))
                {
                    return(true);
                }
                IUserAttribute userAttributeItem = item.As <IUserAttribute>();

                if (((userAttributeItem != null) &&
                     this._parent.ProcedureValues.Remove(userAttributeItem)))
                {
                    return(true);
                }
                return(false);
            }
Example #2
0
            /// <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)
            {
                IMeasurementValue measurementValueItem = item.As <IMeasurementValue>();

                if (((measurementValueItem != null) &&
                     this._parent.MeasurementValues.Remove(measurementValueItem)))
                {
                    return(true);
                }
                ITransformerObservation transformerObservationItem = item.As <ITransformerObservation>();

                if (((transformerObservationItem != null) &&
                     this._parent.TransformerObservations.Remove(transformerObservationItem)))
                {
                    return(true);
                }
                IUserAttribute userAttributeItem = item.As <IUserAttribute>();

                if (((userAttributeItem != null) &&
                     this._parent.Properties.Remove(userAttributeItem)))
                {
                    return(true);
                }
                if ((this._parent.Procedure == item))
                {
                    this._parent.Procedure = null;
                    return(true);
                }
                return(false);
            }
Example #3
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                ILimit limitsCasted = item.As <ILimit>();

                if ((limitsCasted != null))
                {
                    this._parent.Limits.Add(limitsCasted);
                }
                ICompatibleUnit compatibleUnitsCasted = item.As <ICompatibleUnit>();

                if ((compatibleUnitsCasted != null))
                {
                    this._parent.CompatibleUnits.Add(compatibleUnitsCasted);
                }
                IProcedureDataSet procedureDataSetsCasted = item.As <IProcedureDataSet>();

                if ((procedureDataSetsCasted != null))
                {
                    this._parent.ProcedureDataSets.Add(procedureDataSetsCasted);
                }
                IUserAttribute procedureValuesCasted = item.As <IUserAttribute>();

                if ((procedureValuesCasted != null))
                {
                    this._parent.ProcedureValues.Add(procedureValuesCasted);
                }
            }
Example #4
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IMeasurementValue measurementValuesCasted = item.As <IMeasurementValue>();

                if ((measurementValuesCasted != null))
                {
                    this._parent.MeasurementValues.Add(measurementValuesCasted);
                }
                ITransformerObservation transformerObservationsCasted = item.As <ITransformerObservation>();

                if ((transformerObservationsCasted != null))
                {
                    this._parent.TransformerObservations.Add(transformerObservationsCasted);
                }
                IUserAttribute propertiesCasted = item.As <IUserAttribute>();

                if ((propertiesCasted != null))
                {
                    this._parent.Properties.Add(propertiesCasted);
                }
                if ((this._parent.Procedure == null))
                {
                    IProcedure procedureCasted = item.As <IProcedure>();
                    if ((procedureCasted != null))
                    {
                        this._parent.Procedure = procedureCasted;
                        return;
                    }
                }
            }
Example #5
0
            /// <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)
            {
                IUserAttribute userAttributeItem = item.As <IUserAttribute>();

                if (((userAttributeItem != null) &&
                     this._parent.AssetProperites.Remove(userAttributeItem)))
                {
                    return(true);
                }
                IReliabilityInfo reliabilityInfoItem = item.As <IReliabilityInfo>();

                if (((reliabilityInfoItem != null) &&
                     this._parent.ReliabilityInfos.Remove(reliabilityInfoItem)))
                {
                    return(true);
                }
                if (((userAttributeItem != null) &&
                     this._parent.Ratings.Remove(userAttributeItem)))
                {
                    return(true);
                }
                IQualificationRequirement qualificationRequirementItem = item.As <IQualificationRequirement>();

                if (((qualificationRequirementItem != null) &&
                     this._parent.QualificationRequirements.Remove(qualificationRequirementItem)))
                {
                    return(true);
                }
                IAssetPropertyCurve assetPropertyCurveItem = item.As <IAssetPropertyCurve>();

                if (((assetPropertyCurveItem != null) &&
                     this._parent.AssetPropertyCurves.Remove(assetPropertyCurveItem)))
                {
                    return(true);
                }
                IDimensionsInfo dimensionsInfoItem = item.As <IDimensionsInfo>();

                if (((dimensionsInfoItem != null) &&
                     this._parent.DimensionsInfos.Remove(dimensionsInfoItem)))
                {
                    return(true);
                }
                IMedium mediumItem = item.As <IMedium>();

                if (((mediumItem != null) &&
                     this._parent.Mediums.Remove(mediumItem)))
                {
                    return(true);
                }
                return(false);
            }
Example #6
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IUserAttribute assetProperitesCasted = item.As <IUserAttribute>();

                if ((assetProperitesCasted != null))
                {
                    this._parent.AssetProperites.Add(assetProperitesCasted);
                }
                IReliabilityInfo reliabilityInfosCasted = item.As <IReliabilityInfo>();

                if ((reliabilityInfosCasted != null))
                {
                    this._parent.ReliabilityInfos.Add(reliabilityInfosCasted);
                }
                IUserAttribute ratingsCasted = item.As <IUserAttribute>();

                if ((ratingsCasted != null))
                {
                    this._parent.Ratings.Add(ratingsCasted);
                }
                IQualificationRequirement qualificationRequirementsCasted = item.As <IQualificationRequirement>();

                if ((qualificationRequirementsCasted != null))
                {
                    this._parent.QualificationRequirements.Add(qualificationRequirementsCasted);
                }
                IAssetPropertyCurve assetPropertyCurvesCasted = item.As <IAssetPropertyCurve>();

                if ((assetPropertyCurvesCasted != null))
                {
                    this._parent.AssetPropertyCurves.Add(assetPropertyCurvesCasted);
                }
                IDimensionsInfo dimensionsInfosCasted = item.As <IDimensionsInfo>();

                if ((dimensionsInfosCasted != null))
                {
                    this._parent.DimensionsInfos.Add(dimensionsInfosCasted);
                }
                IMedium mediumsCasted = item.As <IMedium>();

                if ((mediumsCasted != null))
                {
                    this._parent.Mediums.Add(mediumsCasted);
                }
            }
Example #7
0
            /// <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)
            {
                IUserAttribute userAttributeItem = item.As <IUserAttribute>();

                if (((userAttributeItem != null) &&
                     this._parent.UserAttributes.Remove(userAttributeItem)))
                {
                    return(true);
                }
                IChargeProfileData chargeProfileDataItem = item.As <IChargeProfileData>();

                if (((chargeProfileDataItem != null) &&
                     this._parent.ChargeProfileData.Remove(chargeProfileDataItem)))
                {
                    return(true);
                }
                if ((this._parent.ChargeProfile == item))
                {
                    this._parent.ChargeProfile = null;
                    return(true);
                }
                return(false);
            }
Example #8
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IUserAttribute userAttributesCasted = item.As <IUserAttribute>();

                if ((userAttributesCasted != null))
                {
                    this._parent.UserAttributes.Add(userAttributesCasted);
                }
                IChargeProfileData chargeProfileDataCasted = item.As <IChargeProfileData>();

                if ((chargeProfileDataCasted != null))
                {
                    this._parent.ChargeProfileData.Add(chargeProfileDataCasted);
                }
                if ((this._parent.ChargeProfile == null))
                {
                    IChargeProfile chargeProfileCasted = item.As <IChargeProfile>();
                    if ((chargeProfileCasted != null))
                    {
                        this._parent.ChargeProfile = chargeProfileCasted;
                        return;
                    }
                }
            }