Ejemplo n.º 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)
 {
     if ((this._parent.ChargeProfile == null))
     {
         IChargeProfile chargeProfileCasted = item.As <IChargeProfile>();
         if ((chargeProfileCasted != null))
         {
             this._parent.ChargeProfile = chargeProfileCasted;
             return;
         }
     }
     if ((this._parent.BillDeterminant == null))
     {
         IBillDeterminant billDeterminantCasted = item.As <IBillDeterminant>();
         if ((billDeterminantCasted != null))
         {
             this._parent.BillDeterminant = billDeterminantCasted;
             return;
         }
     }
 }
Ejemplo n.º 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)
            {
                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;
                    }
                }
            }