Exemple #1
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                ITariffProfile tariffProfilesCasted = item.As <ITariffProfile>();

                if ((tariffProfilesCasted != null))
                {
                    this._parent.TariffProfiles.Add(tariffProfilesCasted);
                }
                ICharge chargesCasted = item.As <ICharge>();

                if ((chargesCasted != null))
                {
                    this._parent.Charges.Add(chargesCasted);
                }
            }
Exemple #2
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                ITariffProfile tariffProfilesCasted = item.As <ITariffProfile>();

                if ((tariffProfilesCasted != null))
                {
                    this._parent.TariffProfiles.Add(tariffProfilesCasted);
                }
                IPricingStructure pricingStructuresCasted = item.As <IPricingStructure>();

                if ((pricingStructuresCasted != null))
                {
                    this._parent.PricingStructures.Add(pricingStructuresCasted);
                }
            }
Exemple #3
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)
            {
                ITariffProfile tariffProfileItem = item.As <ITariffProfile>();

                if (((tariffProfileItem != null) &&
                     this._parent.TariffProfiles.Remove(tariffProfileItem)))
                {
                    return(true);
                }
                ICharge chargeItem = item.As <ICharge>();

                if (((chargeItem != null) &&
                     this._parent.Charges.Remove(chargeItem)))
                {
                    return(true);
                }
                return(false);
            }
Exemple #4
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)
            {
                ITariffProfile tariffProfileItem = item.As <ITariffProfile>();

                if (((tariffProfileItem != null) &&
                     this._parent.TariffProfiles.Remove(tariffProfileItem)))
                {
                    return(true);
                }
                IPricingStructure pricingStructureItem = item.As <IPricingStructure>();

                if (((pricingStructureItem != null) &&
                     this._parent.PricingStructures.Remove(pricingStructureItem)))
                {
                    return(true);
                }
                return(false);
            }